From 5d4546367abb3bbd15622e0517561c4bc853abd6 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Fri, 7 Oct 2016 16:36:06 +0000 Subject: [PATCH] Upgrade/Install: Show correct time of last checked update. Props PieWP for initial patch. Fixes #37554. git-svn-id: https://develop.svn.wordpress.org/trunk@38743 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/update-core.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php index bb03b09ddf..2c1149181d 100644 --- a/src/wp-admin/update-core.php +++ b/src/wp-admin/update-core.php @@ -589,9 +589,16 @@ if ( 'upgrade-core' == $action ) { echo '

'; } + $last_update_check = false; + $current = get_site_transient( 'update_core' ); + + if ( $current && isset ( $current->last_checked ) ) { + $last_update_check = $current->last_checked + get_option( 'gmt_offset' ) * HOUR_IN_SECONDS; + } + echo '

'; /* translators: %1 date, %2 time. */ - printf( __( 'Last checked on %1$s at %2$s.' ), date_i18n( __( 'F j, Y' ) ), date_i18n( __( 'g:i a' ) ) ); + printf( __( 'Last checked on %1$s at %2$s.' ), date_i18n( __( 'F j, Y' ), $last_update_check ), date_i18n( __( 'g:i a' ), $last_update_check ) ); echo '   ' . __( 'Check Again' ) . ''; echo '

';