Skip to content

Commit

Permalink
Event history: use strftime() instead of DateTime::format() for date …
Browse files Browse the repository at this point in the history
…headings

refs #11629
  • Loading branch information
Al2Klimov committed Apr 25, 2016
1 parent 0ffb58b commit 25185b9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Monitoring Module (2.1.2)\n"
"Report-Msgid-Bugs-To: dev@icinga.org\n"
"POT-Creation-Date: 2016-02-29 14:40+0000\n"
"PO-Revision-Date: 2016-04-25 12:05+0200\n"
"PO-Revision-Date: 2016-04-25 14:19+0200\n"
"Last-Translator: Thomas Gelf <thomas@gelf.net>\n"
"Language: de_DE\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -4389,8 +4389,8 @@ msgstr "erreichbar"

#: /vagrant/modules/monitoring/application/views/scripts/partials/event-history.phtml:41
msgctxt "date.verbose"
msgid "l, F j, Y"
msgstr "l, j. F Y"
msgid "%A, %B %e, %Y"
msgstr "%A, %e. %B %Y"

#: /vagrant/modules/monitoring/application/views/scripts/alertsummary/index.phtml:35
msgid "notifications per hour"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ $timelineInterval = new DateInterval('P1D');
$timelinePos = DateTime::createFromFormat('Y-m-d\TH:i:s', date('Y-m-d') . 'T00:00:00');
$cmpFormat = 'Y-m-d';
$timelinePosStr = $timelinePos->format($cmpFormat);
$reprFormat = $this->translate('l, F j, Y', 'date.verbose');
$reprFormat = $this->translate('%A, %B %e, %Y', 'date.verbose');

$firstEvent = true;

Expand Down Expand Up @@ -79,7 +79,7 @@ foreach ($history->peekAhead() as $event):
}

if ($printTableHead) { ?>
<h3><?= $timelinePos->format($reprFormat) ?></h3>
<h3><?= strftime($reprFormat, $timelinePos->getTimestamp()) ?></h3>
<hr>
<?php
echo $tableHead;
Expand Down

0 comments on commit 25185b9

Please sign in to comment.