diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index 3de51754b..6bab931dc 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -842,7 +842,7 @@ case 'autosave' : // The name of this action is hardcoded in edit_post() $do_lock = true; $data = ''; - $message = sprintf( __('Draft Saved at %s.'), date( __('g:i:s a'), current_time( 'timestamp', true ) ) ); + $message = sprintf( __('Draft Saved at %s.'), date_i18n( __('g:i:s a') ) ); $supplemental = array(); diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 0087b4205..ec4a02f43 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -46,13 +46,13 @@ function mysql2date( $dateformatstring, $mysqlstring, $translate = true ) { * The 'mysql' type will return the time in the format for MySQL DATETIME field. * The 'timestamp' type will return the current timestamp. * - * If the $gmt is set to either '1' or 'true', then both types will use the - * GMT offset in the WordPress option to add the GMT offset to the time. + * If $gmt is set to either '1' or 'true', then both types will use GMT time. + * if $gmt is false, the output is adjusted with the GMT offset in the WordPress option. * * @since 1.0.0 * * @param string $type Either 'mysql' or 'timestamp'. - * @param int|bool $gmt Optional. Whether to use $gmt offset. Default is false. + * @param int|bool $gmt Optional. Whether to use GMT timezone. Default is false. * @return int|string String if $type is 'gmt', int if $type is 'timestamp'. */ function current_time( $type, $gmt = 0 ) { diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 6b648d003..7e640f39d 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -1191,7 +1191,7 @@ function wp_post_revision_title( $revision, $link = true ) { $autosavef = __( '%s [Autosave]' ); $currentf = __( '%s [Current Revision]' ); - $date = date_i18n( $datef, strtotime( $revision->post_modified_gmt . ' +0000' ) ); + $date = date_i18n( $datef, strtotime( $revision->post_modified ) ); if ( $link && current_user_can( 'edit_post', $revision->ID ) && $link = get_edit_post_link( $revision->ID ) ) $date = "$date";