[wp-trac] Re: [WordPress Trac] #7753: Use of localized calendar
system and translating digits in entire WordPress
WordPress Trac
wp-trac at lists.automattic.com
Tue May 5 14:51:35 GMT 2009
#7753: Use of localized calendar system and translating digits in entire WordPress
--------------------------------------+-------------------------------------
Reporter: kambiz.k | Owner: anonymous
Type: enhancement | Status: reopened
Priority: low | Milestone: Future Release
Component: i18n | Version: 2.6.1
Severity: minor | Resolution:
Keywords: needs-patch dev-feedback |
--------------------------------------+-------------------------------------
Comment(by kambiz.k):
You got half of the issue. I am taking only about displaying dates in
another culture (or calendar system) only in pages. It is very difficult
to input dates in other calendar systems. In the other hand, it is
worthless because the author can easily enter the date as Gregorian. I try
to describe the issue better.
In touch_time(), WP uses mysql2date function to get fields of the publish
date/time. User may change these fields, but anyway with or without
modification later these fields will be used to create a timestamp for
storing in DB.
If somebody write a plugin and use the new date_i18n hook to override
calendar system or to localize date/time digits, it will corrupt the
fields of publish date. While editing a post, the fields of its publish
date/time should kept in Gregorian calendar with Latin digits to prevent
such problem.
To get rid of problem you only need to pass false for translate parameter
of mysql2date calls in touch_time(), otherwise nobody can use date_i18n
hook. Be sure, it doesn't affect other parts of code.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/7753#comment:17>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list