Closed
Description
Description
The test fails at certain times.
https://github.com/php/php-src/actions/runs/6767338868/job/18389812623
The following code:
<?php
$formatter = new IntlDateFormatter(
"en_US",
IntlDateFormatter::RELATIVE_FULL,
IntlDateFormatter::NONE,
"America/Los_Angeles",
IntlDateFormatter::GREGORIAN,
);
echo $formatter->format(new DateTimeImmutable("yesterday"));
result:
Saturday, November 4, 2023 // now is 2023-11-06 11:08:00 UTC
This is due to time zone mismatch. I thought it would be enough to just specify the time zone in DateTimeImmutable
, but there are places in the test where it is purposely set to UTC, so I don't know what the purpose of the test is.
Is it okay to just set the time zones?
Regards.
PHP Version
PHP8.1 ~ master
Operating System
No response