Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The aggregator modul does not display dates in locale format. To solve this, you have to modify 2 rows in the aggregator modul (1.233.2.4):
line 1103:
- $output .= '<h3>'. date('F j, Y', $item->timestamp) ."</h3>\n";
+ $output .= '<h3>'. format_date($item->timestamp, 'custom', 'F j, Y') ."</h3>\n";
line 1107:
- $output .= ' <div class="date">'. date('H:i', $item->timestamp) ."</div>\n";
+ $output .= ' <div class="date">'. format_date($item->timestamp, 'custom', 'H:i') ."</div>\n";
Comments
Comment #1
Gábor Hojtsy+1
Comment #2
Steven CreditAttribution: Steven commentedCommited a modified version to HEAD and 4.6.
In fact, the code slightly higher up for checking if a new day had started also needed to use format_date(): otherwise the day boundaries would not adjust themselves to your timezone.
Comment #3
(not verified) CreditAttribution: commented