Package: php
Version: 8.2.18-1~deb12u1
PHP isn't parsing the system time zone like it used to be, instead
defaulting to UTC.
Here is a test script:
<?php
print date_default_timezone_get() . "\n";
Running this with PHP 8.1 (and earlier) vs 8.2 produces different output:
# php8.1 foo.php
America/New_York
# php8.2 foo.php
UTC
The patch that is supposed to make this work is
debian/patches/0021-Use-system-timezone.patch, but it apparently no
longer works.
Others have noticed, but upstream says the default has always been UTC:
https://github.com/php/php-src/issues/11496
That issue has a link to a commit that may have broken the patch:
https://github.com/php/php-src/commit/6770158d474fa442ce55bba4ec32dd2703828b33
It seems that the commit sets the default to "UTC" rather than "", which
probably overrides the patch-determined value.
Proper POSIX behaviour is to honour the timezone passed in via
environment, so it would be good to restore correct behaviour.
--Pat