Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update I18n/Time.php, fix timeAgoInWords(timezone)
Fixed issue with the timezone not being applied in Cake\I18n\Time\timeAgoInWords().
  • Loading branch information
icaroscherma committed Apr 21, 2015
1 parent 8a83521 commit 85dd5b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/I18n/Time.php
Expand Up @@ -272,6 +272,10 @@ public function timeAgoInWords(array $options = [])
}
}

if ($timezone) {
$this->timezone($timezone);
}

$now = $from->format('U');
$inSeconds = $this->format('U');
$backwards = ($inSeconds > $now);
Expand Down

0 comments on commit 85dd5b4

Please sign in to comment.