Make WordPress Core

Ticket #48650: 48650.diff

File 48650.diff, 1.8 KB (added by johnbillion, 6 years ago)
  • src/wp-includes/formatting.php

    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 ) { 
    34863486}
    34873487
    34883488/**
    3489  * Returns a date in the GMT equivalent.
     3489 * Given a date in the timezone of the site, returns that date in GMT timezone.
    34903490 *
    34913491 * Requires and returns a date in the Y-m-d H:i:s format.
    34923492 * Return format can be overridden using the $format parameter.
    34933493 *
    34943494 * @since 1.2.0
    34953495 *
    3496  * @param string $string The date to be converted.
     3496 * @param string $string The date to be converted, in the timezone of the site.
    34973497 * @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.
    34993499 */
    35003500function get_gmt_from_date( $string, $format = 'Y-m-d H:i:s' ) {
    35013501        $datetime = date_create( $string, wp_timezone() );
    function get_gmt_from_date( $string, $format = 'Y-m-d H:i:s' ) { 
    35083508}
    35093509
    35103510/**
    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.
    35123512 *
    35133513 * Requires and returns a date in the Y-m-d H:i:s format.
    35143514 * Return format can be overridden using the $format parameter.
    35153515 *
    35163516 * @since 1.2.0
    35173517 *
    3518  * @param string $string The date to be converted.
     3518 * @param string $string The date to be converted, in GMT timezone.
    35193519 * @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.
    35213521 */
    35223522function get_date_from_gmt( $string, $format = 'Y-m-d H:i:s' ) {
    35233523        $datetime = date_create( $string, new DateTimeZone( 'UTC' ) );