Setting the timezone on the test to the same timezone specified when the initial time set up fixed the test failure. I think it would fix the test failure for all developers west of the selected timezone of Europe/London.
(Alternative option: if there was a way to set the timezone for the container doing the testing, this would also become a host-timezone-independent test.)
This test was failing on my machine with the following (but did not fail in the GH Action build):
Some brief investigation showed that the time calculation was 6 hours prior; which lines up with my current timezone, America/Chicago, or UTC -6:00.
Setting the timezone on the test to the same timezone specified when the initial time set up fixed the test failure. I think it would fix the test failure for all developers west of the selected timezone of Europe/London.
(Alternative option: if there was a way to set the timezone for the container doing the testing, this would also become a host-timezone-independent test.)