From 8410526528fbd117b1502d24ff547a6614be1eec Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 25 Oct 2019 11:05:07 +0000 Subject: [PATCH] Date/Time: Make sure `date_i18n()` correctly handles zero timestamp after [45901]. Props soulseekah, gravityview, Rarst. Reviewed by azaozz, SergeyBiryukov. Fixes #28636. Built from https://develop.svn.wordpress.org/trunk@46577 git-svn-id: http://core.svn.wordpress.org/trunk@46374 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index f8255dd262..e7216f99ca 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -176,9 +176,9 @@ function date_i18n( $format, $timestamp_with_offset = false, $gmt = false ) { */ if ( 'U' === $format ) { $date = $timestamp; - } elseif ( $gmt && ! $timestamp_with_offset ) { // Current time in UTC. + } elseif ( $gmt && false === $timestamp_with_offset ) { // Current time in UTC. $date = wp_date( $format, null, new DateTimeZone( 'UTC' ) ); - } elseif ( ! $timestamp_with_offset ) { // Current time in site's timezone. + } elseif ( false === $timestamp_with_offset ) { // Current time in site's timezone. $date = wp_date( $format ); } else { /* diff --git a/wp-includes/version.php b/wp-includes/version.php index 1f25848b0b..8de4f3f9ff 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-RC2-46576'; +$wp_version = '5.3-RC2-46577'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.