mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Date/Time: Make sure date_i18n() correctly handles zero timestamp after [45901].
Props soulseekah, gravityview, Rarst. Reviewed by azaozz, SergeyBiryukov. Fixes #28636. git-svn-id: https://develop.svn.wordpress.org/trunk@46577 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user