Bug #67866 [Asn]: Incompataility Between PHP 5.4.29 And 5.4.30+

From: Date: Wed, 20 Aug 2014 09:42:57 +0000
Subject: Bug #67866 [Asn]: Incompataility Between PHP 5.4.29 And 5.4.30+
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187192@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67866&edit=1 ID: 67866 Updated by: derick@php.net Reported by: graham at mineuk dot com Summary: Incompataility Between PHP 5.4.29 And 5.4.30+ Status: Assigned Type: Bug Package: Date/time related PHP Version: 5.4.30, 5.5.14 Assigned To: derick Block user comment: N Private report: N New Comment: I am not sure what the problem is. Not having microseconds in there was a bug. Previous Comments: ------------------------------------------------------------------------ [2014-08-19 17:13:39] requinix@php.net Related To: Bug #67838 ------------------------------------------------------------------------ [2014-08-19 15:16:36] graham at mineuk dot com Description: ------------ The following code: ``` <?php $dt = new DateTime(); $dt->setTimestamp(1234567890); var_dump($dt->modify('4 year')); ``` results in the following in php 5.4.29: ``` object(DateTime)#1 (3) { ["date"]=> string(19) "2013-02-14 00:31:30" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } ``` but in php 5.4.30 and 5.4.31: ``` object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-14 00:31:30.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } ``` Test script: --------------- <?php $dt = new DateTime(); $dt->setTimestamp(1234567890); var_dump($dt->modify('4 year')); Expected result: ---------------- object(DateTime)#1 (3) { ["date"]=> string(19) "2013-02-14 00:31:30" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Actual result: -------------- object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-14 00:31:30.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67866&edit=1

« previous php.bugs (#187192) next »