Bug #60089 [PATCH]: DateTime::createFromFormat() U after u nukes microtime

From: Date: Tue, 18 Oct 2011 21:07:24 +0000
Subject: Bug #60089 [PATCH]: DateTime::createFromFormat() U after u nukes microtime
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-164415@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 Patch added by: salathe@php.net Reported by: salathe@php.net Summary: DateTime::createFromFormat() U after u nukes microtime Status: Assigned 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 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 Previous Comments: ------------------------------------------------------------------------ [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 (#164415) next »