[wp-trac] [WordPress Trac] #48384: get_post_time returns wrong value after timezone switch
WordPress Trac
noreply at wordpress.org
Thu Oct 24 06:28:26 UTC 2019
#48384: get_post_time returns wrong value after timezone switch
-------------------------------------------------+-------------------------
Reporter: david.binda | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.3.1
Component: Date/Time | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests commit | Focuses:
dev-feedback |
-------------------------------------------------+-------------------------
Comment (by Rarst):
> Seems this would need a context, to be aware of the post type, draft vs.
published
This logic absolutely does not belong in date retrieval. The purpose of
this branch of functions is to take a database value and turn it into
workable representation.
Treating presence or absence or magical values of dates is sprinkled all
through the core and would take another year to fix.
The new API didn't ''break'' anything here, it just highlights things that
''had always been broken'' by bringing clear implementations and
meaningful error handling into the old messed up code.
We need new API to (gradually) fix the mess, not the other way around.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48384#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list