WordPress.org

Make WordPress Core

Changeset 10491


Ignore:
Timestamp:
02/03/09 23:06:17 (6 years ago)
Author:
ryan
Message:

Respect time zone when displaying autosave and revision time. Props janbrasna, designsimply. fixes #8750 #6489 for 2.7

Location:
branches/2.7
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.7/wp-admin/admin-ajax.php

    r10262 r10491  
    724724 
    725725    $data = ''; 
    726     $message = sprintf( __('Draft Saved at %s.'), date( __('g:i:s a'), current_time( 'timestamp', true ) ) ); 
     726    $message = sprintf( __('Draft Saved at %s.'), date_i18n( __('g:i:s a') ) ); 
    727727 
    728728    $supplemental = array(); 
  • branches/2.7/wp-includes/functions.php

    r10354 r10491  
    8080 * The 'timestamp' type will return the current timestamp. 
    8181 * 
    82  * If the $gmt is set to either '1' or 'true', then both types will use the 
    83  * GMT offset in the WordPress option to add the GMT offset to the time. 
     82 * If $gmt is set to either '1' or 'true', then both types will use GMT time. 
     83 * if $gmt is false, the output is adjusted with the GMT offset in the WordPress option. 
    8484 * 
    8585 * @since 1.0.0 
    8686 * 
    8787 * @param string $type Either 'mysql' or 'timestamp'. 
    88  * @param int|bool $gmt Optional. Whether to use $gmt offset. Default is false. 
     88 * @param int|bool $gmt Optional. Whether to use GMT timezone. Default is false. 
    8989 * @return int|string String if $type is 'gmt', int if $type is 'timestamp'. 
    9090 */ 
  • branches/2.7/wp-includes/post-template.php

    r10460 r10491  
    10491049    $currentf  = __( '%s [Current Revision]' ); 
    10501050 
    1051     $date = date_i18n( $datef, strtotime( $revision->post_modified_gmt . ' +0000' ) ); 
     1051    $date = date_i18n( $datef, strtotime( $revision->post_modified ) ); 
    10521052    if ( $link && current_user_can( 'edit_post', $revision->ID ) && $link = get_edit_post_link( $revision->ID ) ) 
    10531053        $date = "<a href='$link'>$date</a>"; 
Note: See TracChangeset for help on using the changeset viewer.