Make WordPress Core


Ignore:
Timestamp:
03/23/2015 02:13:50 AM (10 years ago)
Author:
dd32
Message:

Remove ambiguity in the time display format in core, switches to using 24hr notation where am/pm isn't specified.

  • H:i - 09:54
  • g:i a - 9:54 am
  • F j, Y - January 3, 2015

These shouldn't be used without a/A (am/AM)

  • h:i - 01:23
  • G:i - 1:23

Props iseulde. Fixes #31121

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/revision.php

    r31471 r31862  
    204204            'title'      => get_the_title( $post->ID ),
    205205            'author'     => $authors[ $revision->post_author ],
    206             'date'       => date_i18n( __( 'M j, Y @ G:i' ), $modified ),
    207             'dateShort'  => date_i18n( _x( 'j M @ G:i', 'revision date short format' ), $modified ),
     206            'date'       => date_i18n( __( 'M j, Y @ H:i' ), $modified ),
     207            'dateShort'  => date_i18n( _x( 'j M @ H:i', 'revision date short format' ), $modified ),
    208208            'timeAgo'    => sprintf( __( '%s ago' ), human_time_diff( $modified_gmt, $now_gmt ) ),
    209209            'autosave'   => $autosave,
     
    222222            'title'      => get_the_title( $post->ID ),
    223223            'author'     => $authors[ $post->post_author ],
    224             'date'       => date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_modified ) ),
    225             'dateShort'  => date_i18n( _x( 'j M @ G:i', 'revision date short format' ), strtotime( $post->post_modified ) ),
     224            'date'       => date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_modified ) ),
     225            'dateShort'  => date_i18n( _x( 'j M @ H:i', 'revision date short format' ), strtotime( $post->post_modified ) ),
    226226            'timeAgo'    => sprintf( __( '%s ago' ), human_time_diff( strtotime( $post->post_modified_gmt ), $now_gmt ) ),
    227227            'autosave'   => false,
Note: See TracChangeset for help on using the changeset viewer.