[wp-trac] [WordPress Trac] #35458: current_date returns incorrect timestamp
WordPress Trac
noreply at wordpress.org
Mon Mar 12 14:12:43 UTC 2018
#35458: current_date returns incorrect timestamp
-------------------------------+------------------------------
Reporter: Turn On Social | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Date/Time | Version:
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by Rarst):
While there is no official name for it you had discovered what I call
"WordPress timestamp". It is indeed consists of sum of Unix timestamp with
timezone offset and is grossly incompatible with Unix time.
Multiple WordPress functions ''expect'' WordPress timestamp and produce
invalid results if passed Unix timestamp, most prominently `date_i18n()`,
see #38771
This behavior is essentially set in stone, short of completely rewriting
entirety of Date/Time component in core.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35458#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list