From 25d9d478ac28d6747e75538ea9421cd72660ec4e Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 11 Jul 2013 20:57:47 +0000 Subject: [PATCH] Compare GMT to GMT. see #24425. git-svn-id: http://core.svn.wordpress.org/trunk@24663 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/revision.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/revision.php b/wp-admin/includes/revision.php index cef7585f9d..91cb634260 100644 --- a/wp-admin/includes/revision.php +++ b/wp-admin/includes/revision.php @@ -64,7 +64,7 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) { function wp_prepare_revisions_for_js( $post, $selected_revision_id ) { $post = get_post( $post ); $revisions = array(); - $current = current_time( 'timestamp' ); + $now_gmt = time(); $revisions = wp_get_post_revisions( $post->ID ); @@ -91,7 +91,7 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id ) { 'date' => date_i18n( __( 'M j, Y @ G:i' ), $modified_gmt ), 'dateShort' => date_i18n( _x( 'j M @ G:i', 'revision date short format' ), $modified_gmt ), 'dateUnix' => $modified_gmt, - 'timeAgo' => sprintf( __( '%s ago' ), human_time_diff( $modified_gmt, $current ) ), + 'timeAgo' => sprintf( __( '%s ago' ), human_time_diff( $modified_gmt, $now_gmt ) ), 'autosave' => wp_is_post_autosave( $revision ), 'current' => $revision->post_modified_gmt === $post->post_modified_gmt, 'restoreUrl' => urldecode( $restore_link ),