Make WordPress Core


Ignore:
Timestamp:
10/25/2019 11:03:13 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Date/Time: Make sure date_i18n() correctly handles zero timestamp after [45901].

Props soulseekah, gravityview, Rarst.
Reviewed by azaozz, SergeyBiryukov.
Fixes #28636.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r46569 r46577  
    177177    if ( 'U' === $format ) {
    178178        $date = $timestamp;
    179     } elseif ( $gmt && ! $timestamp_with_offset ) { // Current time in UTC.
     179    } elseif ( $gmt && false === $timestamp_with_offset ) { // Current time in UTC.
    180180        $date = wp_date( $format, null, new DateTimeZone( 'UTC' ) );
    181     } elseif ( ! $timestamp_with_offset ) { // Current time in site's timezone.
     181    } elseif ( false === $timestamp_with_offset ) { // Current time in site's timezone.
    182182        $date = wp_date( $format );
    183183    } else {
Note: See TracChangeset for help on using the changeset viewer.