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

WordPress Trac noreply at wordpress.org
Fri Oct 11 20:11: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 Rarst):

 Good news, bad news... :)

 Latest patch does fix timezone issue in `c` format. But only that.

 It treats symptom rather than underlying issue. For example in another
 shorthand `r` names of day and month are not being correctly localized for
 same reasons:

 {{{
 var_dump( date_i18n( DATE_RFC822 ) ); // Пт, 11 Окт 13 23:04:43 +0300 <<
 localized
 var_dump( date_i18n( 'r' ) ); // Fri, 11 Oct 2013 23:04:43 +0000 << stays
 English
 }}}

 I think we need a patch that fixes all of this, rather than treating this
 case by case. Meaning digging up ''all'' shorthands WP doesn't understand
 and converting them to formats it does.

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


More information about the wp-trac mailing list