diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 60229ee10b..3b8ed27b20 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -74,7 +74,8 @@ function current_time( $type, $gmt = 0 ) { } /** - * Retrieve the date in localized format, based on timestamp. + * Retrieve the date in localized format, based on a sum of Unix timestamp and + * timezone offset in seconds. * * If the locale specifies the locale month and weekday, then the locale will * take over the format for the date. If it isn't, then the date format string @@ -84,15 +85,16 @@ function current_time( $type, $gmt = 0 ) { * * @global WP_Locale $wp_locale * - * @param string $dateformatstring Format to display the date. - * @param bool|int $unixtimestamp Optional. Unix timestamp. Default false. - * @param bool $gmt Optional. Whether to use GMT timezone. Default false. + * @param string $dateformatstring Format to display the date. + * @param int|bool $timestamp_with_offset Optional. A sum of Unix timestamp and timezone offset in seconds. + * Default false. + * @param bool $gmt Optional. Whether to use GMT timezone. Default false. * * @return string The date, translated if locale specifies it. */ -function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) { +function date_i18n( $dateformatstring, $timestamp_with_offset = false, $gmt = false ) { global $wp_locale; - $i = $unixtimestamp; + $i = $timestamp_with_offset; if ( false === $i ) { $i = current_time( 'timestamp', $gmt ); @@ -147,7 +149,7 @@ function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) { * * @param string $j Formatted date string. * @param string $req_format Format to display the date. - * @param int $i Unix timestamp. + * @param int $i A sum of Unix timestamp and timezone offset in seconds. * @param bool $gmt Whether to convert to GMT for time. Default false. */ $j = apply_filters( 'date_i18n', $j, $req_format, $i, $gmt );