Skip to content

[BUGFIX] Persist immutable timezone conversions - #640

Merged
sfroemkenjw merged 1 commit into
jweiland-net:mainfrom
loeffler-schaffrath:main
Sep 7, 2026
Merged

sfroemkenjw merged 1 commit into
jweiland-net:mainfrom
loeffler-schaffrath:main

Conversation

@loeffler-schaffrath

Copy link
Copy Markdown
Contributor

Fixes a logic error when converting immutable event dates to the configured timezone.

DateTimeImmutable::setTimezone() returns a new instance.
The extension discarded that return value, so the timezone conversion was never persisted.

As a result, the same conversion branch ran repeatedly and PHP 8.5 emitted excessive warnings, causing log flooding in PHP 8.5 due to its method marked there with #[\NoDiscard]

The actual bug existed with versions prior to PHP 8.5 as well, just with no warnings.

@sfroemkenjw
sfroemkenjw merged commit 8e77e54 into jweiland-net:main Sep 7, 2026
2 checks passed
@sfroemkenjw

Copy link
Copy Markdown
Contributor

Hi @loeffler-schaffrath

thank you for taking care of that. Merged

Stefan

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