Bug #77097 [Com]: DateTime::diff gives wrong diff when the actual diff is less than 1 second
| From: | wyatt at wyday dot com | Date: | Thu, 22 Nov 2018 14:42:31 +0000 |
| Subject: | Bug #77097 [Com]: DateTime::diff gives wrong diff when the actual diff is less than 1 second | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-218087@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77097&edit=1
ID: 77097
Comment by: wyatt at wyday dot com
Reported by: vishnunn at ymail dot com
Summary: DateTime::diff gives wrong diff when the actual diff
is less than 1 second
Status: Verified
Type: Bug
Package: Date/time related
Operating System: CentOS Linux 7.5.1804
PHP Version: 7.3.0RC4
Assigned To: derick
Block user comment: N
Private report: N
New Comment:
I've also reported this bug on the timelib repository with more details: https://github.com/derickr/timelib/issues/51
Previous Comments:
------------------------------------------------------------------------
[2018-11-22 14:31:22] wyatt at wyday dot com
We can confirm this bug exists on PHP 7.3.0 RC5 (for our development machines) and PHP 7.2.12 for
our production machines. This is a showstopper for us. We've had to rollback to 7.2.11 on our
production machines and we'll be unable to upgrade to any new version until this bug is fixed.
It looks like it's related to the latest timelib upgrade. It looks like you should revert that
change in the next version until all the edge cases are solved.
------------------------------------------------------------------------
[2018-11-13 13:42:16] cmb@php.net
Related To: Bug #77145
------------------------------------------------------------------------
[2018-11-09 06:04:01] sakari dot laine at verkkokauppa dot com
Affects also 7.2.12
------------------------------------------------------------------------
[2018-11-08 09:55:53] cmb@php.net
Related To: Bug #77121
------------------------------------------------------------------------
[2018-11-03 12:21:15] cmb@php.net
I can confirm a behavioral change, albeit I get a slightly
different result with PHP-7.3 (@9afce01), where 'f' is
float(0.218249). This would basically still be somehow correct,
but if I request an $absolute result, I still get an identical
result, which is certainly not correct.
Derick, could you please have a look at this?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=77097
--
Edit this bug report at https://bugs.php.net/bug.php?id=77097&edit=1