Skip to content
Permalink
Browse files

improved test, removed condition to let tests pass, need help on non-…

…utc offset <-> timezone conversion
  • Loading branch information...
Jonas Hartmann authored and markstory committed Apr 30, 2016
1 parent 75bcf62 commit e8cae33d70a935017c9b50feabe4182178bf58da
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/I18n/DateFormatTrait.php
  2. +1 −1 tests/TestCase/I18n/TimeTest.php
@@ -193,9 +193,9 @@ public function i18nFormat($format = null, $timezone = null, $locale = null)
$time = $this;
// This is required for testI18nFormatWithOffsetTimezone to pass
if ($time->getTimezone()->getName() === date_default_timezone_get()) {
// if ($time->getTimezone()->getName() === date_default_timezone_get()) {
$timezone = $timezone ?: static::getDefaultOutputTimezone();
}
// }
if ($timezone) {
// Handle the immutable and mutable object cases.
@@ -208,7 +208,7 @@ public function timeAgoEndProvider()
*/
public function testTimeAgoInWordsTimezone($class)
{
$time = new FrozenTime('1990-07-31 20:33:00 UTC');
$time = new $class('1990-07-31 20:33:00 UTC');
$result = $time->timeAgoInWords(
[
'timezone' => 'America/Vancouver',

0 comments on commit e8cae33

Please sign in to comment.
You can’t perform that action at this time.