[wp-trac] [WordPress Trac] #28636: Add functions for working with local dates and times

WordPress Trac noreply at wordpress.org
Fri Aug 22 02:43:21 UTC 2014


#28636: Add functions for working with local dates and times
-------------------------+-----------------------------
 Reporter:  mboynes      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Date/Time    |     Version:  2.9
 Severity:  normal       |  Resolution:
 Keywords:  2nd-opinion  |     Focuses:
-------------------------+-----------------------------

Comment (by rmccue):

 +1 on this ticket in general.

 Looking at it, as nacin noted, `gmt_offset` allows anything. One huge
 issue is that DateTimeZone does '''not''' handle arbitrary timezone
 offsets; we've [https://github.com/WP-API/WP-API/issues/371 run into
 this], and [https://github.com/WP-API/WP-API/pull/431 had to change our
 handling] because of it.

 The latter patch seems to handle this fine.

 One thing I see missing right now is checking for "Z" in the time string;
 Z indicates Zulu time (UTC) in ISO8601/RFC3339. Note that ISO8601 can also
 take timezone offsets in the form of "+hhmm" or "+hh" (ditto -). IMO,
 detecting this is more trouble than it's worth, and it might be worth
 reconsidering that approach.

 I'll check this out. :)

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


More information about the wp-trac mailing list