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
This commit is contained in:
parent
5e18c8320b
commit
8410526528
|
@ -176,9 +176,9 @@ function date_i18n( $format, $timestamp_with_offset = false, $gmt = false ) {
|
||||||
*/
|
*/
|
||||||
if ( 'U' === $format ) {
|
if ( 'U' === $format ) {
|
||||||
$date = $timestamp;
|
$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' ) );
|
$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 );
|
$date = wp_date( $format );
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue