Bug #76252 [Opn->Dup]: Incrementing microseconds work funny
| From: | requinix@php.net | Date: | Mon, 23 Apr 2018 09:16:33 +0000 |
| Subject: | Bug #76252 [Opn->Dup]: Incrementing microseconds work funny | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-214840@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76252&edit=1
ID: 76252
Updated by: requinix@php.net
Reported by: cz dot paranoiq at gmail dot com
Summary: Incrementing microseconds work funny
-Status: Open
+Status: Duplicate
Type: Bug
Package: Date/time related
PHP Version: 7.2.4
Block user comment: N
Private report: N
New Comment:
Duplicate of bug #75642
Previous Comments:
------------------------------------------------------------------------
[2018-04-23 09:01:16] cz dot paranoiq at gmail dot com
Description:
------------
after adding 1 microsecond to datetime with 999999 microseconds, resulted datetime has the same
seconds and 1000000 microseconds :]
see the second dump
https://3v4l.org/ZbGpl
Test script:
---------------
<?php
$d = new \DateTimeImmutable('2000-01-01 23:59:59.999999');
$d2 = $d->modify('+1 microsecond');
var_dump($d);
var_dump($d->format('s.u'));
var_dump($d2);
var_dump($d2->format('s.u'));
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76252&edit=1