Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php (revision 9607)
+++ wp-includes/functions.php (working copy)
@@ -112,12 +112,12 @@
* @param int $unixtimestamp Unix timestamp
* @return string The date, translated if locale specifies it.
*/
-function date_i18n( $dateformatstring, $unixtimestamp ) {
+function date_i18n( $dateformatstring, $unixtimestamp, $gmt = false ) {
global $wp_locale;
$i = $unixtimestamp;
// Sanity check for PHP 5.1.0-
- if ( -1 == $i )
- $i = false;
+ if ( intval($i) < 1 )
+ $i = time();
if ( ( !empty( $wp_locale->month ) ) && ( !empty( $wp_locale->weekday ) ) ) {
$datemonth = $wp_locale->get_month( date( 'm', $i ) );
@@ -136,7 +136,7 @@
$dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 );
}
- $j = @date( $dateformatstring, $i );
+ $j = $gmt? @gmdate( $dateformatstring, $i ) : @date( $dateformatstring, $i );
return $j;
}
Index: wp-admin/wp-admin.css
===================================================================
--- wp-admin/wp-admin.css (revision 9607)
+++ wp-admin/wp-admin.css (working copy)
@@ -1313,7 +1313,7 @@
}
.form-table input.small-text {
- width: 40px;
+ width: 50px;
}
#profile-page .form-table textarea {
Index: wp-admin/options-general.php
===================================================================
--- wp-admin/options-general.php (revision 9607)
+++ wp-admin/options-general.php (working copy)
@@ -119,9 +119,9 @@
?>
-UTC time is %s
'), gmdate(__('Y-m-d G:i:s'))); ?>
+UTC time is %s
'), date_i18n(__('Y-m-d G:i:s'), false, 'gmt')); ?>
- %2$s'), $current_offset_name, gmdate(__('Y-m-d G:i:s'), current_time('timestamp'))); ?>
+ %2$s'), $current_offset_name, date_i18n(__('Y-m-d G:i:s'))); ?>
@@ -148,12 +148,12 @@
echo " checked='checked'";
$custom = FALSE;
}
- echo ' /> ' . gmdate( $format, current_time('timestamp') ) . "
\n";
+ echo ' /> ' . date_i18n( $format ) . "
\n";
}
echo ' ' . gmdate( get_option('date_format'), current_time('timestamp') ) . "\n";
+ echo '/> ' . __('Custom:') . ' ' . date_i18n( get_option('date_format') ) . "\n";
echo "\t
" . __('Documentation on date formatting. Click "Save Changes" to update sample output.') . "
\n"; ?> @@ -180,12 +180,12 @@ echo " checked='checked'"; $custom = FALSE; } - echo ' /> ' . gmdate( $format, current_time('timestamp') ) . "