[wp-trac] [WordPress Trac] #40653: Use PHP `DateTime` class API in `current_time()`
WordPress Trac
noreply at wordpress.org
Mon Aug 19 21:05:52 UTC 2019
#40653: Use PHP `DateTime` class API in `current_time()`
--------------------------------------+-----------------------------
Reporter: jdgrimes | Owner: SergeyBiryukov
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.3
Component: Date/Time | Version: 1.0
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"45856" 45856]:
{{{
#!CommitTicketReference repository="" revision="45856"
Date/Time: Use PHP `DateTime` class API in `current_time()`.
Only use the legacy WP timestamp approach (a sum of timestamp and timezone
offset) for `timestamp` and `U` formats without the `$gmt` flag.
Otherwise, make sure the function returns correct local time for any
format.
Props Rarst, jdgrimes.
Fixes #40653.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40653#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list