Skip to content

Commit

Permalink
lib: Only invert relative partial times if necessary
Browse files Browse the repository at this point in the history
refs #6778
  • Loading branch information
lippserd committed May 22, 2015
1 parent d17842b commit dd298ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Icinga/Date/DateFormatter.php
Expand Up @@ -202,7 +202,7 @@ public static function timeSince($time, $timeOnly = false)
public static function timeUntil($time, $timeOnly = false)
{
list($type, $until, $invert) = static::diff($time);
if ($invert) {
if ($invert && $type === static::RELATIVE) {
$until = '-' . $until;
}
if ($timeOnly) {
Expand Down

0 comments on commit dd298ed

Please sign in to comment.