[wp-trac] [WordPress Trac] #42451: Fix Wordpress UCT Time not correct issue

WordPress Trac noreply at wordpress.org
Tue Nov 7 00:44:21 UTC 2017


#42451: Fix Wordpress UCT Time not correct issue
--------------------------+-----------------------------
 Reporter:  taojing10     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.8.3
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 in wp-includes/functions.php, look for

                 case 'timestamp':
                         return ( $gmt ) ? time() : time() + ( get_option(
 'gmt_offset' ) * HOUR_IN_SECONDS );
 change to
                 case 'timestamp':
                         //return ( $gmt ) ? time() : time() + (
 get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
                         return ( $gmt ) ? strtotime(gmdate('Y-m-d H:i:s'))
 : strtotime(gmdate('Y-m-d H:i:s')) + ( get_option( 'gmt_offset' ) * 3600
 );

 This issue because of php timestamp function.

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


More information about the wp-trac mailing list