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

WordPress Trac noreply at wordpress.org
Thu Jul 28 00:35:31 UTC 2016


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

Comment (by smerriman):

 This bug has been around for at least 4 years now. Is there any chance at
 least the fix for 'c' could be added to core? Wanting to output an ISO
 8601 date string for a post is very common (structured data, metadata,
 etc), and it's strange that in order to do so anywhere within WordPress,
 you need to use 'Y-m-d\TH:i:sP' instead of 'c' (and only after lots of
 debugging / searching, as the Wordpress documentation itself says to use
 'c':

 https://codex.wordpress.org/Formatting_Date_and_Time

--
Ticket URL: <https://core.trac.wordpress.org/ticket/20973#comment:39>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list