Navigation Menu

Skip to content

Commit

Permalink
Accomodate immutable dates and use named formats.
Browse files Browse the repository at this point in the history
Use the proper ISO-8601 formats.
  • Loading branch information
markstory committed Nov 6, 2015
1 parent c6d973f commit 8deb66f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/I18n/DateFormatTrait.php
Expand Up @@ -355,9 +355,9 @@ public function jsonSerialize()
public function __debugInfo()
{
return [
'time' => $this->format(DateTime::ISO8601),
'time' => $this->toIso8601String(),
'timezone' => $this->getTimezone()->getName(),
'fixedNowTime' => $this->hasTestNow() ? $this->getTestNow()->format(DateTime::ISO8601) : false
'fixedNowTime' => $this->hasTestNow() ? $this->getTestNow()->toIso8601String() : false
];
}
}
Expand Up @@ -294,7 +294,7 @@ public function testWriteFarFuture()
$this->Cookie->configKey('Testing', 'expires', '+90 years');
$this->Cookie->write('Testing', 'value');
$future = new Time('now');
$future->modify('+90 years');
$future = $future->modify('+90 years');

$expected = [
'name' => 'Testing',
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/I18n/TimeTest.php
Expand Up @@ -604,9 +604,9 @@ public function testDebugInfo()
{
$time = new Time('2014-04-20 10:10:10');
$expected = [
'time' => '2014-04-20T10:10:10+0000',
'time' => '2014-04-20T10:10:10+00:00',
'timezone' => 'UTC',
'fixedNowTime' => Time::getTestNow()->toISO8601String()
'fixedNowTime' => Time::getTestNow()->toIso8601String()
];
$this->assertEquals($expected, $time->__debugInfo());
}
Expand Down

0 comments on commit 8deb66f

Please sign in to comment.