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

Built from https://develop.svn.wordpress.org/trunk@31862


git-svn-id: http://core.svn.wordpress.org/trunk@31841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2015-03-23 02:14:27 +00:00
parent 69de85fd48
commit cc903c3422
10 changed files with 16 additions and 16 deletions

View File

@ -89,7 +89,7 @@ $messages['post'] = array(
8 => sprintf( __('Post submitted. <a target="_blank" href="%s">Preview post</a>'), esc_url( add_query_arg( 'preview', 'true', $permalink ) ) ),
9 => sprintf( __('Post scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview post</a>'),
/* translators: Publish box date format, see http://php.net/date */
date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( $permalink ) ),
date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) ), esc_url( $permalink ) ),
10 => sprintf( __('Post draft updated. <a target="_blank" href="%s">Preview post</a>'), esc_url( add_query_arg( 'preview', 'true', $permalink ) ) ),
);
$messages['page'] = array(
@ -102,7 +102,7 @@ $messages['page'] = array(
6 => sprintf( __('Page published. <a href="%s">View page</a>'), esc_url( $permalink ) ),
7 => __('Page saved.'),
8 => sprintf( __('Page submitted. <a target="_blank" href="%s">Preview page</a>'), esc_url( add_query_arg( 'preview', 'true', $permalink ) ) ),
9 => sprintf( __('Page scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview page</a>'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( $permalink ) ),
9 => sprintf( __('Page scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview page</a>'), date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) ), esc_url( $permalink ) ),
10 => sprintf( __('Page draft updated. <a target="_blank" href="%s">Preview page</a>'), esc_url( add_query_arg( 'preview', 'true', $permalink ) ) ),
);
$messages['attachment'] = array_fill( 1, 10, __( 'Media attachment updated.' ) ); // Hack, for now.

View File

@ -100,7 +100,7 @@ if ( !defined('ABSPATH') )
<div class="misc-pub-section curtime misc-pub-curtime">
<?php
/* translators: Publish box date format, see http://php.net/date */
$datef = __( 'M j, Y @ G:i' );
$datef = __( 'M j, Y @ H:i' );
$stamp = __('Submitted on: <b>%1$s</b>');
$date = date_i18n( $datef, strtotime( $comment->comment_date ) );
?>

View File

@ -546,7 +546,7 @@ class WP_Comments_List_Table extends WP_List_Table {
}
public function column_date() {
return get_comment_date( __( 'Y/m/d \a\t g:ia' ) );
return get_comment_date( __( 'Y/m/d \a\t g:i a' ) );
}
public function column_response() {

View File

@ -446,7 +446,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
*/
$action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
$date_format = __( 'M j, Y @ G:i' );
$date_format = __( 'M j, Y @ H:i' );
$last_updated_timestamp = strtotime( $plugin['last_updated'] );
?>
<div class="plugin-card plugin-card-<?php echo sanitize_html_class( $plugin['slug'] ); ?>">

View File

@ -821,7 +821,7 @@ class WP_Posts_List_Table extends WP_List_Table {
$t_time = $h_time = __( 'Unpublished' );
$time_diff = 0;
} else {
$t_time = get_the_time( __( 'Y/m/d g:i:s A' ) );
$t_time = get_the_time( __( 'Y/m/d g:i:s a' ) );
$m_time = $post->post_date;
$time = get_post_time( 'G', true, $post );

View File

@ -162,7 +162,7 @@ echo esc_html( $visibility_trans ); ?></span>
<?php
/* translators: Publish box date format, see http://php.net/date */
$datef = __( 'M j, Y @ G:i' );
$datef = __( 'M j, Y @ H:i' );
if ( 0 != $post->ID ) {
if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
$stamp = __('Scheduled for: <b>%1$s</b>');
@ -293,7 +293,7 @@ function attachment_submit_meta_box( $post ) {
<div id="misc-publishing-actions">
<?php
/* translators: Publish box date format, see http://php.net/date */
$datef = __( 'M j, Y @ G:i' );
$datef = __( 'M j, Y @ H:i' );
$stamp = __('Uploaded on: <b>%1$s</b>');
$date = date_i18n( $datef, strtotime( $post->post_date ) );
?>

View File

@ -440,7 +440,7 @@ function install_plugin_information() {
echo "</div>\n";
$date_format = __( 'M j, Y @ G:i' );
$date_format = __( 'M j, Y @ H:i' );
$last_updated_timestamp = strtotime( $api->last_updated );
?>
<div id="<?php echo $_tab; ?>-content" class='<?php echo $_with_banner; ?>'>

View File

@ -203,8 +203,8 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null
'id' => $revision->ID,
'title' => get_the_title( $post->ID ),
'author' => $authors[ $revision->post_author ],
'date' => date_i18n( __( 'M j, Y @ G:i' ), $modified ),
'dateShort' => date_i18n( _x( 'j M @ G:i', 'revision date short format' ), $modified ),
'date' => date_i18n( __( 'M j, Y @ H:i' ), $modified ),
'dateShort' => date_i18n( _x( 'j M @ H:i', 'revision date short format' ), $modified ),
'timeAgo' => sprintf( __( '%s ago' ), human_time_diff( $modified_gmt, $now_gmt ) ),
'autosave' => $autosave,
'current' => $current,
@ -221,8 +221,8 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null
'id' => $post->ID,
'title' => get_the_title( $post->ID ),
'author' => $authors[ $post->post_author ],
'date' => date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_modified ) ),
'dateShort' => date_i18n( _x( 'j M @ G:i', 'revision date short format' ), strtotime( $post->post_modified ) ),
'date' => date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_modified ) ),
'dateShort' => date_i18n( _x( 'j M @ H:i', 'revision date short format' ), strtotime( $post->post_modified ) ),
'timeAgo' => sprintf( __( '%s ago' ), human_time_diff( strtotime( $post->post_modified_gmt ), $now_gmt ) ),
'autosave' => false,
'current' => true,

View File

@ -18,7 +18,7 @@ if ( ! current_user_can( 'manage_options' ) )
$title = __('General Settings');
$parent_file = 'options-general.php';
/* translators: date and time format for exact current time, mainly about timezones, see http://php.net/date */
$timezone_format = _x('Y-m-d G:i:s', 'timezone date format');
$timezone_format = _x('Y-m-d H:i:s', 'timezone date format');
/**
* Display JavaScript on the page.

View File

@ -1700,7 +1700,7 @@ function wp_post_revision_title( $revision, $link = true ) {
return false;
/* translators: revision date format, see http://php.net/date */
$datef = _x( 'j F, Y @ G:i', 'revision date format');
$datef = _x( 'F j, Y @ H:i', 'revision date format');
/* translators: 1: date */
$autosavef = _x( '%1$s [Autosave]', 'post revision title extra' );
/* translators: 1: date */
@ -1736,7 +1736,7 @@ function wp_post_revision_title_expanded( $revision, $link = true ) {
$author = get_the_author_meta( 'display_name', $revision->post_author );
/* translators: revision date format, see http://php.net/date */
$datef = _x( 'j F, Y @ G:i:s', 'revision date format');
$datef = _x( 'F j, Y @ H:i:s', 'revision date format');
$gravatar = get_avatar( $revision->post_author, 24 );