Skip to content

Pin test suite timezone to UTC so date tests are host-independent#420

Merged
PrinsFrank merged 1 commit into
PrinsFrank:mainfrom
cosmocode:timezone
Jun 21, 2026
Merged

Pin test suite timezone to UTC so date tests are host-independent#420
PrinsFrank merged 1 commit into
PrinsFrank:mainfrom
cosmocode:timezone

Conversation

@splitbrain

Copy link
Copy Markdown
Contributor

When trying to run the test suit on my system a couple of tests failed. This is because PDFs without a timezone return their time in local time (which is Europe/Berlin in my case) but the fixtures were created with a fixed UTC time zone. This makes sure tests run in UTC always.

Dates parsed from PDFs without an explicit UTC offset fall back to the
default timezone, so DateValueTest and the issue-150 sample only passed
when the host ran in UTC (CI) and failed on other timezones.

Pin date.timezone to UTC in phpunit.xml.dist and make the affected
DateValueTest expectations use an explicit UTC timezone.
@PrinsFrank

Copy link
Copy Markdown
Owner

Thank you!!!

@PrinsFrank PrinsFrank merged commit 774912c into PrinsFrank:main Jun 21, 2026
21 checks passed
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