Bug #60089 [Asn->Csd]: DateTime::createFromFormat() U after u nukes microtime

From: Date: Wed, 05 Oct 2016 20:00:01 +0000
Subject: Bug #60089 [Asn->Csd]: DateTime::createFromFormat() U after u nukes microtime
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204495@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60089&edit=1 ID: 60089 Updated by: derick@php.net Reported by: salathe@php.net Summary: DateTime::createFromFormat() U after u nukes microtime -Status: Assigned +Status: Closed Type: Bug Package: Date/time related PHP Version: trunk-SVN-2011-10-18 (SVN) Assigned To: derickr Block user comment: N Private report: N New Comment: The fix for this bug has been committed. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Fixed for PHP 7.1.0 RC4. Previous Comments: ------------------------------------------------------------------------ [2011-10-18 21:07:24] salathe@php.net The following patch has been added/updated: Patch Name: trunk-60089-quickfix Revision: 1318972043 URL: https://bugs.php.net/patch-display.php?bug=60089&patch=trunk-60089-quickfix&revision=1318972043 ------------------------------------------------------------------------ [2011-10-18 21:03:32] salathe@php.net Description: ------------ A format string containing a Unix timestamp at any point after a microsecond value leaves the microseconds unset in the resulting DateTime object. Test script: --------------- <?php date_default_timezone_set('UTC'); var_dump(DateTime::createFromFormat('u U', '123456 123456790')->format('U u')); ?> Expected result: ---------------- string(16) "123456790 123456" Actual result: -------------- string(16) "123456790 000000" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60089&edit=1

« previous php.bugs (#204495) next »