WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#42451 closed defect (bug)

Fix Wordpress UCT Time not correct issue — at Initial Version

Reported by: taojing10 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.8.3
Component: Date/Time Keywords: reporter-feedback
Focuses: Cc:

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.