diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index f7d248294c..0be917d565 100644
|
a
|
b
|
function _wp_iso_convert( $match ) { |
| 3486 | 3486 | } |
| 3487 | 3487 | |
| 3488 | 3488 | /** |
| 3489 | | * Returns a date in the GMT equivalent. |
| | 3489 | * Given a date in the timezone of the site, returns that date in GMT timezone. |
| 3490 | 3490 | * |
| 3491 | 3491 | * Requires and returns a date in the Y-m-d H:i:s format. |
| 3492 | 3492 | * Return format can be overridden using the $format parameter. |
| 3493 | 3493 | * |
| 3494 | 3494 | * @since 1.2.0 |
| 3495 | 3495 | * |
| 3496 | | * @param string $string The date to be converted. |
| | 3496 | * @param string $string The date to be converted, in the timezone of the site. |
| 3497 | 3497 | * @param string $format The format string for the returned date. Default 'Y-m-d H:i:s'. |
| 3498 | | * @return string GMT version of the date provided. |
| | 3498 | * @return string Formatted version of the date provided in GMT timezone. |
| 3499 | 3499 | */ |
| 3500 | 3500 | function get_gmt_from_date( $string, $format = 'Y-m-d H:i:s' ) { |
| 3501 | 3501 | $datetime = date_create( $string, wp_timezone() ); |
| … |
… |
function get_gmt_from_date( $string, $format = 'Y-m-d H:i:s' ) { |
| 3508 | 3508 | } |
| 3509 | 3509 | |
| 3510 | 3510 | /** |
| 3511 | | * Converts a GMT date into the correct format for the blog. |
| | 3511 | * Given a date in GMT timezone, returns that date in the timezone of the site. |
| 3512 | 3512 | * |
| 3513 | 3513 | * Requires and returns a date in the Y-m-d H:i:s format. |
| 3514 | 3514 | * Return format can be overridden using the $format parameter. |
| 3515 | 3515 | * |
| 3516 | 3516 | * @since 1.2.0 |
| 3517 | 3517 | * |
| 3518 | | * @param string $string The date to be converted. |
| | 3518 | * @param string $string The date to be converted, in GMT timezone. |
| 3519 | 3519 | * @param string $format The format string for the returned date. Default 'Y-m-d H:i:s'. |
| 3520 | | * @return string Formatted date relative to the timezone. |
| | 3520 | * @return string Formatted version of the date provided in the site's timezone. |
| 3521 | 3521 | */ |
| 3522 | 3522 | function get_date_from_gmt( $string, $format = 'Y-m-d H:i:s' ) { |
| 3523 | 3523 | $datetime = date_create( $string, new DateTimeZone( 'UTC' ) ); |