Add a better time format for downtime

This commit is contained in:
Alexander Fuhr 2014-09-26 15:57:00 +02:00
parent cf997e998f
commit c73b291cf4
1 changed files with 10 additions and 1 deletions

View File

@ -29,7 +29,16 @@
<td class="state"> <td class="state">
<strong><?= $downtime->is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?></strong> <strong><?= $downtime->is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?></strong>
<br> <br>
<?= $this->prefixedTimeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start); ?> <?=
$this->dateTimeRenderer(
($downtime->is_in_effect ? $downtime->end : $downtime->start),
true
)->render(
$this->translate('on %s', 'datetime'),
$this->translate('at %s', 'time'),
$this->translate('in %s', 'timespan')
);
?>
</td> </td>
<td> <td>
<?php if (isset($downtime->service)): ?> <?php if (isset($downtime->service)): ?>