Bug #75354 [Opn->Csd]: Decimal places of DateInterval::$f are lost
| From: | derick@php.net | Date: | Thu, 12 Oct 2017 13:36:07 +0000 |
| Subject: | Bug #75354 [Opn->Csd]: Decimal places of DateInterval::$f are lost | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211642@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75354&edit=1
ID: 75354
Updated by: derick@php.net
Reported by: christian dot flothmann at sensiolabs dot de
Summary: Decimal places of DateInterval::$f are lost
-Status: Open
+Status: Closed
Type: Bug
Package: Date/time related
PHP Version: 7.2.0RC3
-Assigned To:
+Assigned To: derick
Block user comment: N
Private report: N
New Comment:
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at
http://www.php.net/downloads.php
Should be fixed in 7.2.0RC4.
Previous Comments:
------------------------------------------------------------------------
[2017-10-12 11:53:06] thiago dot oak at gmail dot com
This seems to be fixed on the latest master
------------------------------------------------------------------------
[2017-10-10 16:33:02] christian dot flothmann at sensiolabs dot de
Description:
------------
Since PHP 7.2 RC1 microseconds are returned as 0 (see https://3v4l.org/W3Xld).
Test script:
---------------
$i = new \DateInterval('PT0S');
$i->f = 0.1;
var_dump($i->f);
Expected result:
----------------
float(0.1)
Actual result:
--------------
float(0)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75354&edit=1