- } elseif ( $time !== strtotime( $str, 1 ) ) { // It's a relative timestamp.
- // $time is relative to 0 so it's a duration length.
- return $this->formatDuration( $time );
+ } elseif ( $time !== strtotime( $str, $now + 1 ) ) { // It's a relative timestamp.
+ // The result differs based on current time, so the difference
+ // is a fixed duration length.
+ return $this->formatDuration( $time - $now );