Make WordPress Core

Ticket #37554: 37554.diff

File 37554.diff, 1.0 KB (added by swissspidy, 8 years ago)
  • src/wp-admin/update-core.php

    diff --git src/wp-admin/update-core.php src/wp-admin/update-core.php
    index 404bb8a..e667d76 100644
    if ( 'upgrade-core' == $action ) { 
    596596                echo '</p></div>';
    597597        }
    598598
     599        $last_update_check = current_time( 'timestamp' );
     600        $current = get_site_transient( 'update_core' );
     601
     602        var_dump( date( __( 'g:i a' ), $current->last_checked ) );
     603
     604        if ( $current && isset ( $current->last_checked ) )     {
     605                $last_update_check = $current->last_checked + get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
     606        }
     607
    599608        echo '<p>';
    600609        /* translators: %1 date, %2 time. */
    601         printf( __( 'Last checked on %1$s at %2$s.' ), date_i18n( __( 'F j, Y' ) ), date_i18n( __( 'g:i a' ) ) );
     610        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 ) );
    602611        echo ' &nbsp; <a class="button" href="' . esc_url( self_admin_url('update-core.php?force-check=1') ) . '">' . __( 'Check Again' ) . '</a>';
    603612        echo '</p>';
    604613