[wp-trac] [WordPress Trac] #58192: get_post_datetime() always returns local time even when using 'gmt' as $source
WordPress Trac
noreply at wordpress.org
Wed Apr 26 07:17:16 UTC 2023
#58192: get_post_datetime() always returns local time even when using 'gmt' as
$source
--------------------------+----------------------
Reporter: nboole | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Date/Time | Version: 6.2
Severity: normal | Resolution: invalid
Keywords: has-patch | Focuses:
--------------------------+----------------------
Changes (by Rarst):
* status: new => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
Return in local time is intended and documented behavior for the function.
There are options for ''input'' to instantiate from, but the ''output'' is
always given in a consistent state and not meant to be configured (this
reduced complexity of arguments and room for error). If UTC time is
needed, it can be derived from the resulting object.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58192#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list