diff --git a/aggregator.install b/aggregator.install index 9e2a101..11a88a2 100644 --- a/aggregator.install +++ b/aggregator.install @@ -334,3 +334,10 @@ function aggregator_update_last_removed() { function aggregator_update_1001() { config_set('aggregator.settings', 'aggregator_ssl_verification', TRUE); } + +/** + * Set default value for date_format setting. + */ +function aggregator_update_1002() { + config_set('aggregator.settings', 'date_format', 'D, m/d/Y - H:i'); +} diff --git a/aggregator.pages.inc b/aggregator.pages.inc index 0da4f08..cc325ec 100644 --- a/aggregator.pages.inc +++ b/aggregator.pages.inc @@ -333,7 +333,8 @@ function template_preprocess_aggregator_item(&$variables) { $variables['source_date'] = t('%ago ago', array('%ago' => format_interval(REQUEST_TIME - $item->timestamp))); } else { - $variables['source_date'] = format_date($item->timestamp, 'custom', variable_get('date_format_medium', 'D, m/d/Y - H:i')); + $format = config_get('aggregator.settings', 'date_format'); + $variables['source_date'] = format_date($item->timestamp, 'custom', $format); } $variables['categories'] = array(); diff --git a/config/aggregator.settings.json b/config/aggregator.settings.json index 6657f98..42fa980 100644 --- a/config/aggregator.settings.json +++ b/config/aggregator.settings.json @@ -13,5 +13,6 @@ "feed_item_length": "fulltext", "teaser_length": 600, "clear": 9676800, - "aggregator_ssl_verification": true + "aggregator_ssl_verification": true, + "date_format": "D, m/d/Y - H:i" }