Skip to content

Commit

Permalink
Fix more off by a second errors
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 28, 2012
1 parent ab2ce29 commit 94bd2ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Cake/Test/Case/Utility/CakeTimeTest.php
Expand Up @@ -340,14 +340,14 @@ public function testNice() {
$this->assertEquals(date('Y-d-m', $time), $this->Time->nice($time));
$this->assertEquals('%Y-%d-%m', $this->Time->niceFormat);

CakeTime::$niceFormat = '%Y-%d-%m %H:%M:%S';
$this->assertEquals(date('Y-d-m H:i:s', $time), $this->Time->nice($time));
$this->assertEquals('%Y-%d-%m %H:%M:%S', $this->Time->niceFormat);
CakeTime::$niceFormat = '%Y-%d-%m %H:%M';
$this->assertEquals(date('Y-d-m H:i', $time), $this->Time->nice($time));
$this->assertEquals('%Y-%d-%m %H:%M', $this->Time->niceFormat);

date_default_timezone_set('UTC');
$result = $this->Time->nice(null, 'America/New_York');
$expected = $this->Time->nice(time(), 'America/New_York');
$this->assertEquals($expected, $result);
$this->assertEquals(substr($expected, 0, -1), substr($result, 0, -1));

$this->_restoreSystemTimezone();
}
Expand Down

0 comments on commit 94bd2ce

Please sign in to comment.