[php-src] Issue #8153: DateTime->sub produces different value than on older versions
| From: | cmb69 | Date: | Fri, 25 Feb 2022 17:48:16 +0000 |
| Subject: | [php-src] Issue #8153: DateTime->sub produces different value than on older versions | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240034@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8153
Comment Author: cmb69
This is actually a timelib issue. Relevant code excerpt
https://github.com/php/php-src/blob/33cd61c9045ae8675448456cdda6fb244b2efa01/ext/date/lib/interval.c#L326-L334
This can't work, since the changes after the first
timelib_update_from_sse() are
reset due to the second call to that function. I'm not sure whether that second call can be
removed altogether, or whether it needs to be moved to the then-clause of the if-statement. @derickr
certainly knows. :)