mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-18 14:21:25 +01:00
Docs: Clarify descriptions for get_gmt_from_date()
and get_date_from_gmt()
.
Props johnbillion, Rarst. Fixes #48650. Built from https://develop.svn.wordpress.org/trunk@46958 git-svn-id: http://core.svn.wordpress.org/trunk@46757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0b8438a6d2
commit
8260786e64
@ -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' ) );
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.4-alpha-46957';
|
||||
$wp_version = '5.4-alpha-46958';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user