Make WordPress Core


Ignore:
Timestamp:
11/24/2022 02:16:18 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

    r54855 r54870  
    17981798                         */
    17991799                        if ( '0000-00-00 00:00:00' === $post->post_modified_gmt ) {
    1800                                 $post_modified_gmt = gmdate( 'Y-m-d H:i:s', strtotime( $post->post_modified ) - ( get_option( 'gmt_offset' ) * 3600 ) );
     1800                                $post_modified_gmt = gmdate( 'Y-m-d H:i:s', strtotime( $post->post_modified ) - ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) );
    18011801                        } else {
    18021802                                $post_modified_gmt = $post->post_modified_gmt;
Note: See TracChangeset for help on using the changeset viewer.