[wp-trac] [WordPress Trac] #48858: Incorrect UTC time in WP 5.3
WordPress Trac
noreply at wordpress.org
Tue Dec 3 12:00:57 UTC 2019
#48858: Incorrect UTC time in WP 5.3
--------------------------+------------------------------
Reporter: balykin95 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Date/Time | Version: 5.3
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by balykin95):
So yeah, that's an initial problem.
After WP include admin.php - date shows Universal time as UTC+3.
Now i add writed below code before include admin.php:
{{{
ar_dump(
'time(): ' . time(),
'date_default_timezone_get(): ' . date_default_timezone_get(),
'date(): ' . date( DATE_RFC3339 ),
'gmdate(): ' . gmdate( DATE_RFC3339 ),
);
die;
}}}
Output
{{{
string(18) "time(): 1575374286"
string(42) "date_default_timezone_get(): Europe/London"
string(33) "date(): 2019-12-03T11:58:06+00:00"
string(35) "gmdate(): 2019-12-03T11:58:06+00:00"
}}}
If I add it after include admin.php:
{{{
string(18) "time(): 1575374433"
string(32) "date_default_timezone_get(): UTC"
string(33) "date(): 2019-12-03T15:00:33+03:00"
string(35) "gmdate(): 2019-12-03T12:00:33+00:00"
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48858#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list