Commit 77354a34 authored by drumm's avatar drumm
Browse files

#49443 by Ralf Stamm and webchick. Make default date format consistent.

parent bdfa735e
...@@ -1036,7 +1036,7 @@ function expand_date($element) { ...@@ -1036,7 +1036,7 @@ function expand_date($element) {
$element['#tree'] = TRUE; $element['#tree'] = TRUE;
// Determine the order of day, month, year in the site's chosen date format. // Determine the order of day, month, year in the site's chosen date format.
$format = variable_get('date_format_short', 'm/d/Y'); $format = variable_get('date_format_short', 'm/d/Y - H:i');
$sort = array(); $sort = array();
$sort['day'] = max(strpos($format, 'd'), strpos($format, 'j')); $sort['day'] = max(strpos($format, 'd'), strpos($format, 'j'));
$sort['month'] = max(strpos($format, 'm'), strpos($format, 'M')); $sort['month'] = max(strpos($format, 'm'), strpos($format, 'M'));
......
...@@ -1368,7 +1368,7 @@ function theme_aggregator_page_item($item) { ...@@ -1368,7 +1368,7 @@ function theme_aggregator_page_item($item) {
$source_date = t('%ago ago', array('%ago' => format_interval(time() - $item->timestamp))); $source_date = t('%ago ago', array('%ago' => format_interval(time() - $item->timestamp)));
} }
else { else {
$source_date = format_date($item->timestamp, 'custom', variable_get('date_format_medium', 'D, Y-m-d H:i')); $source_date = format_date($item->timestamp, 'custom', variable_get('date_format_medium', 'D, m/d/Y - H:i'));
} }
$output .= "<div class=\"feed-item\">\n"; $output .= "<div class=\"feed-item\">\n";
......
...@@ -722,7 +722,7 @@ function system_date_time_settings() { ...@@ -722,7 +722,7 @@ function system_date_time_settings() {
$zones = _system_zonelist(); $zones = _system_zonelist();
// Date settings: possible date formats // Date settings: possible date formats
$dateshort = array('Y-m-d H:i','m/d/Y - H:i', 'd/m/Y - H:i', 'Y/m/d - H:i', $dateshort = array('Y-m-d H:i', 'm/d/Y - H:i', 'd/m/Y - H:i', 'Y/m/d - H:i',
'd.m.Y - H:i', 'm/d/Y - g:ia', 'd/m/Y - g:ia', 'Y/m/d - g:ia', 'd.m.Y - H:i', 'm/d/Y - g:ia', 'd/m/Y - g:ia', 'Y/m/d - g:ia',
'M j Y - H:i', 'j M Y - H:i', 'Y M j - H:i', 'M j Y - H:i', 'j M Y - H:i', 'Y M j - H:i',
'M j Y - g:ia', 'j M Y - g:ia', 'Y M j - g:ia'); 'M j Y - g:ia', 'j M Y - g:ia', 'Y M j - g:ia');
...@@ -763,7 +763,7 @@ function system_date_time_settings() { ...@@ -763,7 +763,7 @@ function system_date_time_settings() {
$form['date_format_short'] = array( $form['date_format_short'] = array(
'#type' => 'select', '#type' => 'select',
'#title' => t('Short date format'), '#title' => t('Short date format'),
'#default_value' => variable_get('date_format_short', $dateshort[0]), '#default_value' => variable_get('date_format_short', $dateshort[1]),
'#options' => $dateshortchoices, '#options' => $dateshortchoices,
'#description' => t('The short format of date display.') '#description' => t('The short format of date display.')
); );
...@@ -771,7 +771,7 @@ function system_date_time_settings() { ...@@ -771,7 +771,7 @@ function system_date_time_settings() {
$form['date_format_medium'] = array( $form['date_format_medium'] = array(
'#type' => 'select', '#type' => 'select',
'#title' => t('Medium date format'), '#title' => t('Medium date format'),
'#default_value' => variable_get('date_format_medium', $datemedium[0]), '#default_value' => variable_get('date_format_medium', $datemedium[1]),
'#options' => $datemediumchoices, '#options' => $datemediumchoices,
'#description' => t('The medium sized date display.') '#description' => t('The medium sized date display.')
); );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment