[wp-trac] [WordPress Trac] #43269: Get_The_Date return incorrect Unix Timestamp
WordPress Trac
noreply at wordpress.org
Fri Feb 9 16:45:58 UTC 2018
#43269: Get_The_Date return incorrect Unix Timestamp
--------------------------+------------------------------
Reporter: szarcensky | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Date/Time | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by soulseekah):
This is interesting. Since Unix Epoch timestamps are in Coordinated
Universal Time, assuming the `post_date` to be in UTC will yield an
incorrect timestamp, offset by a predefined number of hours according to
the set timezone.
One way would be to add a new case for 'U', but then what about 'r' and
'c'? Those would also be wrong, since they contain timezone information
which would just be assumed as UTC. Same for 'e', 'I', 'O', 'P', 'T', 'Z'
timezone identifiers, they'd all be incorrect.
What about mixtures thereof?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43269#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list