mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Coding Standards: Use HOUR_IN_SECONDS where appropriate.
This aims to clarify the time units for some time offset values. Follow-up to [21996], [23823], [40108], [41626]. See #56791. git-svn-id: https://develop.svn.wordpress.org/trunk@54870 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1797,7 +1797,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* with the site's timezone offset applied.
|
||||
*/
|
||||
if ( '0000-00-00 00:00:00' === $post->post_modified_gmt ) {
|
||||
$post_modified_gmt = gmdate( 'Y-m-d H:i:s', strtotime( $post->post_modified ) - ( get_option( 'gmt_offset' ) * 3600 ) );
|
||||
$post_modified_gmt = gmdate( 'Y-m-d H:i:s', strtotime( $post->post_modified ) - ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) );
|
||||
} else {
|
||||
$post_modified_gmt = $post->post_modified_gmt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user