Skip to content

Fix/gh 21616 84#3

Merged
MarcusXavierr merged 5 commits intoPHP-8.4from
fix/gh-21616-84
Apr 8, 2026
Merged

Fix/gh 21616 84#3
MarcusXavierr merged 5 commits intoPHP-8.4from
fix/gh-21616-84

Conversation

@MarcusXavierr
Copy link
Copy Markdown
Owner

No description provided.

@MarcusXavierr MarcusXavierr merged commit 081cbe6 into PHP-8.4 Apr 8, 2026
2 checks passed
do_adjust_relative() adds h/i/s to wall-clock fields before converting
to a Unix timestamp. Near a spring-forward gap that produces a
nonexistent time, which resolves to the wrong offset.

Fix: zero out relative h/i/s/us before timelib_update_ts(), apply them
to sse directly. Same technique as timelib_add_wall(). y/m/d, weekday
relatives, and first_last_day_of still go through timelib_update_ts.

Also fixes phpGH-15880.
Always fold microseconds into seconds before SSE arithmetic instead of
guarding with if-checks. Handle negative remainders correctly.
Remove section headers and redundant cases. Add -72h backward through
fall-back, +61 minutes across spring-forward gap, and DateTimeImmutable.
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.

1 participant