[wp-trac] [WordPress Trac] #43269: Get_The_Date return incorrect Unix Timestamp
WordPress Trac
noreply at wordpress.org
Fri Feb 9 11:18:10 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 | Keywords:
Focuses: |
--------------------------+-----------------------------
When calling get_the_date('U'), the mysql2date() line $i = strtotime(
$date ) defaults to GMT when no time zone is provided. However, the date
it receives from get_post()->post_date is the local time zone with no time
zone specified. As a result, the Unix timestamp returned is incorrect. For
PST, the time is off by eight hours.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43269>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list