[wp-trac] [WordPress Trac] #48858: Incorrect UTC time in WP 5.3

WordPress Trac noreply at wordpress.org
Tue Dec 3 06:18: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:  General       |    Version:  5.3
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hi! For tests I took clean server and clean WordPress install.

 For tests all timezones switched to UTC (+0)



 {{{
 CT-20662-bash-4.2# timedatectl
 Local time: Mon 2019-12-02 07:35:33 GMT
 Universal time: Mon 2019-12-02 07:35:33 UTC

 }}}
 ————————


 {{{
 CT-20662-bash-4.2# plesk db ‘SELECT CURRENT_TIME();
 +—————-+
 | CURRENT_TIME() |
 +—————-+
 | 07:35:54 |
 +—————-+
 }}}


 ————————

 {{{
 CT-20662-bash-4.2# /opt/plesk/php/7.3/bin/php -c
 /var/www/vhosts/system/vpstovdc.host4g.ru/etc/php.ini -r ‘echo
 date(«h:i:s»);’
 07:36:13
 }}}



 In WP also choosed Timezone “London”. Saved.


 {{{
 Universal time is 02.12.2019 10:38:36. Local time is 02.12.2019 07:38:36.
 }}}


 I don’t know why, but Universal time show UTC+3. Have no idea where WP
 take it.

 Ok.
 I go to file wp-admin/options-general.php and add add at the beginning:


 {{{
 echo date(«h:i:s»);
 die;
 }}}

 https://vpstovdc.host4g.ru/wp-admin/options-general.php show 07:41:49

 But if I add it (echo date) after "require_once( dirname( __FILE__ ) .
 ‘/admin.php’ );"

 Then i get 10:42:33


 ----------
 Virtual Private Server with CentOS Linux release 7.6.1810 (Core), PHP 7.3

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48858>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list