Permalink
Browse files

Making niceShort() compare the original dateString and userOffset. Th…

…is fixes issues where timezone differences would cause the incorrect short form to be displayed. Fixes #1331
  • Loading branch information...
1 parent b7b1858 commit db5e18feae08261f086bfd52c9d079ea13ae36c8 @markstory markstory committed Jan 6, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 cake/libs/view/helpers/time.php
@@ -106,9 +106,9 @@ function niceShort($dateString = null, $userOffset = null) {
$y = $this->isThisYear($date) ? '' : ' Y';
- if ($this->isToday($date)) {
+ if ($this->isToday($dateString, $userOffset)) {
$ret = sprintf(__('Today, %s',true), date("H:i", $date));
- } elseif ($this->wasYesterday($date)) {
+ } elseif ($this->wasYesterday($dateString, $userOffset)) {
$ret = sprintf(__('Yesterday, %s',true), date("H:i", $date));
} else {
$ret = date("M jS{$y}, H:i", $date);

0 comments on commit db5e18f

Please sign in to comment.