WordPress.org

Make WordPress Core

Changeset 10490


Ignore:
Timestamp:
02/03/2009 11:04:31 PM (9 years ago)
Author:
ryan
Message:

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

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r10476 r10490  
    843843
    844844    $data = '';
    845     $message = sprintf( __('Draft Saved at %s.'), date( __('g:i:s a'), current_time( 'timestamp', true ) ) );
     845    $message = sprintf( __('Draft Saved at %s.'), date_i18n( __('g:i:s a') ) );
    846846
    847847    $supplemental = array();
  • trunk/wp-includes/functions.php

    r10408 r10490  
    4747 * The 'timestamp' type will return the current timestamp.
    4848 *
    49  * If the $gmt is set to either '1' or 'true', then both types will use the
    50  * GMT offset in the WordPress option to add the GMT offset to the time.
     49 * If $gmt is set to either '1' or 'true', then both types will use GMT time.
     50 * if $gmt is false, the output is adjusted with the GMT offset in the WordPress option.
    5151 *
    5252 * @since 1.0.0
    5353 *
    5454 * @param string $type Either 'mysql' or 'timestamp'.
    55  * @param int|bool $gmt Optional. Whether to use $gmt offset. Default is false.
     55 * @param int|bool $gmt Optional. Whether to use GMT timezone. Default is false.
    5656 * @return int|string String if $type is 'gmt', int if $type is 'timestamp'.
    5757 */
  • trunk/wp-includes/post-template.php

    r10485 r10490  
    11921192    $currentf  = __( '%s [Current Revision]' );
    11931193
    1194     $date = date_i18n( $datef, strtotime( $revision->post_modified_gmt . ' +0000' ) );
     1194    $date = date_i18n( $datef, strtotime( $revision->post_modified ) );
    11951195    if ( $link && current_user_can( 'edit_post', $revision->ID ) && $link = get_edit_post_link( $revision->ID ) )
    11961196        $date = "<a href='$link'>$date</a>";
Note: See TracChangeset for help on using the changeset viewer.