mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Fix that time-until doesn't show negative partial time in the dashboard
refs #6778
This commit is contained in:
parent
1e9337846a
commit
970d4d7a4a
@ -202,6 +202,9 @@ class DateFormatter
|
||||
public static function timeUntil($time, $timeOnly = false)
|
||||
{
|
||||
list($type, $until, $invert) = static::diff($time);
|
||||
if ($invert) {
|
||||
$until = '-' . $until;
|
||||
}
|
||||
if ($timeOnly) {
|
||||
return $until;
|
||||
}
|
||||
@ -217,7 +220,7 @@ class DateFormatter
|
||||
case static::RELATIVE:
|
||||
$formatted = sprintf(
|
||||
t('in %s', 'An event will happen after the given time interval has elapsed'),
|
||||
$invert ? ('-' . $until) : $until
|
||||
$until
|
||||
);
|
||||
break;
|
||||
case static::TIME:
|
||||
|
Loading…
x
Reference in New Issue
Block a user