[wp-trac] [WordPress Trac] #20973: date_i18n() produces invalid output for shorthand formats

WordPress Trac noreply at wordpress.org
Fri Oct 11 17:58:07 UTC 2013


#20973: date_i18n() produces invalid output for shorthand formats
--------------------------+------------------------------
 Reporter:  Rarst         |       Owner:
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Date/Time     |     Version:  3.4
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------

Comment (by raubvogel):

 What I have done in the patch: Wordpress calls {{{date_timezone_set}}} to
 the UTC/GMT globally. Therefore {{{date()}}} (which is used in
 {{{date_i18n()}}}) and similar functions don’t care about your time zone
 set in the Wordpress settings. My patch basically makes a call like
 {{{date()}}} but cares about the time zone (take a look at
 [http://www.php.net/manual/en/class.datetime.php PHP’s DateTime class]).
 While doing that no time zone conversations are done!

--
Ticket URL: <http://core.trac.wordpress.org/ticket/20973#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list