Skip to content

Commit

Permalink
improved test, removed condition to let tests pass, need help on non-…
Browse files Browse the repository at this point in the history
…utc offset <-> timezone conversion
  • Loading branch information
Jonas Hartmann authored and markstory committed Jun 2, 2016
1 parent 75bcf62 commit e8cae33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/I18n/DateFormatTrait.php
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/I18n/TimeTest.php
Expand Up @@ -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',
Expand Down

0 comments on commit e8cae33

Please sign in to comment.