Closed MykolaiKorniat closed 1 year ago
oh wow. Nice find. I had no idea this was an issue.
I'm leaning towards not changing this because we'd need a new major release anyways, it has been fixed in 8.1, and active support for 8.0 is ending in 11 days anyways.
That coupled with the fact that this bug manifests itself in a small time window makes me think it isn't worth the effort. Would appreciate your thoughts on this though.
I've reached out on Twitter to see if a patch will be issued for earlier versions but might not get a reply.
Just got a reply that this won't be backported to earlier versions so the issue is here to stay
I found a bug during the last switching from summer to winter time: DateTime::add() adds wrong interval when switching from summer to winter time
DateTimeImmutable::add() calculate wrong "expire_time" and issue already expired code.
Problem is fixed in PHP 8.1, but it's still actual for PHP =< 8.0.
How about editing the timestamp directly instead of using a DateTimeImmutable?