Make WordPress Core


Ignore:
Timestamp:
11/24/2022 02:16:18 PM (2 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/customize/class-wp-customize-date-time-control.php

    r52355 r54870  
    235235            if ( $tz ) {
    236236                $now                   = new DateTime( 'now', $tz );
    237                 $formatted_gmt_offset  = $this->format_gmt_offset( $tz->getOffset( $now ) / 3600 );
     237                $formatted_gmt_offset  = $this->format_gmt_offset( $tz->getOffset( $now ) / HOUR_IN_SECONDS );
    238238                $tz_name               = str_replace( '_', ' ', $tz->getName() );
    239239                $timezone_info['abbr'] = $now->format( 'T' );
Note: See TracChangeset for help on using the changeset viewer.