diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index 2ae03b1cc4..de1aedaf67 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -3497,16 +3497,16 @@ function _wp_iso_convert( $match ) { } /** - * Returns a date in the GMT equivalent. + * Given a date in the timezone of the site, returns that date in UTC timezone. * * Requires and returns a date in the Y-m-d H:i:s format. * Return format can be overridden using the $format parameter. * * @since 1.2.0 * - * @param string $string The date to be converted. + * @param string $string The date to be converted, in the timezone of the site. * @param string $format The format string for the returned date. Default 'Y-m-d H:i:s'. - * @return string GMT version of the date provided. + * @return string Formatted version of the date, in UTC timezone. */ function get_gmt_from_date( $string, $format = 'Y-m-d H:i:s' ) { $datetime = date_create( $string, wp_timezone() ); @@ -3519,16 +3519,16 @@ function get_gmt_from_date( $string, $format = 'Y-m-d H:i:s' ) { } /** - * Converts a GMT date into the correct format for the blog. + * Given a date in UTC timezone, returns that date in the timezone of the site. * * Requires and returns a date in the Y-m-d H:i:s format. * Return format can be overridden using the $format parameter. * * @since 1.2.0 * - * @param string $string The date to be converted. + * @param string $string The date to be converted, in UTC timezone. * @param string $format The format string for the returned date. Default 'Y-m-d H:i:s'. - * @return string Formatted date relative to the timezone. + * @return string Formatted version of the date, in the site's timezone. */ function get_date_from_gmt( $string, $format = 'Y-m-d H:i:s' ) { $datetime = date_create( $string, new DateTimeZone( 'UTC' ) );