Skip to content

TimeTest::testGetAge fails #6818

@kenjis

Description

@kenjis
There was 1 failure:

1) CodeIgniter\I18n\TimeTest::testGetAge
Failed asserting that 4 is identical to 5.

/home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/I18n/TimeTest.php:399

https://github.com/codeigniter4/CodeIgniter4/actions/runs/3399510319/jobs/5653309525

5 Nov 2017 - Daylight Saving Time Ended
When local daylight time was about to reach
Sunday, 5 November 2017, 02:00:00 clocks were turned backward 1 hour to
Sunday, 5 November 2017, 01:00:00 local standard time instead.
https://www.timeanddate.com/time/change/usa/chicago?year=2017

6 Nov 2022 - Daylight Saving Time Ends
When local daylight time is about to reach
Sunday, 6 November 2022, 02:00:00 clocks are turned backward 1 hour to
Sunday, 6 November 2022, 01:00:00 local standard time instead.
https://www.timeanddate.com/time/change/usa/chicago?year=2022

$testTime: 2022-11-05 10:14:35.000000 UTC
$ourTime: 2017-11-05 11:14:35.000000 UTC

public function difference($testTime, ?string $timezone = null)
{
$testTime = $this->getUTCObject($testTime, $timezone);
$ourTime = $this->getUTCObject($this);
return new TimeDifference($ourTime, $testTime);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix themtestingPull requests that changes tests only

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions