[wp-trac] [WordPress Trac] #25002: get_post_time() doesn't return correct GMT time if date_default_timezone_set is changed from UTC.
WordPress Trac
noreply at wordpress.org
Thu Aug 29 13:26:31 UTC 2019
#25002: get_post_time() doesn't return correct GMT time if
date_default_timezone_set is changed from UTC.
--------------------------------------+---------------------
Reporter: johnregan3 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone:
Component: Date/Time | Version: 1.2
Severity: normal | Resolution:
Keywords: has-unit-tests has-patch | Focuses:
--------------------------------------+---------------------
Changes (by Rarst):
* keywords: needs-patch needs-testing bulk-reopened => has-unit-tests has-
patch
Comment:
Ok, `mysql2date()` is getting fixed up some in #28992, but
`get_post_time()` (surprise! surprise!) is broken anyway.
Really not keen on keeping using `mysql2date()` for GMT times, doesn't
really make sense.
As planned added patch introducing `get_post_datetime()`, changing older
functions to use it, with unit tests for old quirky logic.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/25002#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list