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

WordPress Trac noreply at wordpress.org
Tue Dec 3 12:04:28 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 Rarst):

 Again, `date()` looks "wrong", `date_i18n()` looks right, but
 `date_i18n()` is what used to output that "Universal time" in settings,
 which looks wrong.

 Let's add some more things:

 {{{#!php
 var_dump(
         'time(): ' . time(),
         'current_time( \'timestamp\' ): ' . current_time( 'timestamp' ),
         'current_time( \'timestamp\', true ): ' . current_time(
 'timestamp', true ),
         'timezone_string: ' . get_option( 'timezone_string' ),
         'gmt_offset: ' . get_option( 'gmt_offset' ),
         'date_default_timezone_get(): ' . date_default_timezone_get(),
         'date(): ' . date( DATE_RFC3339 ),
         'gmdate(): ' . gmdate( DATE_RFC3339 ),
         'date_i18n(): ' . date_i18n( DATE_RFC3339 ),
         'date_i18n() / GMT: ' . date_i18n( DATE_RFC3339, false, true ),
         'wp_date(): ' . wp_date( DATE_RFC3339 ),
 );
 }}}

 This might be something wrong with your PHP install, possibly borked
 timezone database in it or something.

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


More information about the wp-trac mailing list