Skip to content

Respect local TZ overrides when detecting host timezone - #342

Closed
iMattPro wants to merge 3 commits into
masterfrom
copilot/fix-phpunit-job-failure
Closed

iMattPro wants to merge 3 commits into
masterfrom
copilot/fix-phpunit-job-failure

Conversation

@iMattPro

@iMattPro iMattPro commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

PHP 8.4 can return the SAPI’s original TZ value after putenv() changes it, causing host timezone detection to ignore the local override and fall back to UTC.

  • Timezone detection: Read the local environment value on PHP 7.1+, retaining the existing fallback for older PHP versions.
    $environment = PHP_VERSION_ID >= 70100 ? getenv('TZ', true) : getenv('TZ');

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@iMattPro iMattPro changed the title [WIP] Fix failing GitHub Actions job PHPUnit PHP 8.4 Respect local TZ overrides when detecting host timezone Nov 16, 2026
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants