Edit report at https://bugs.php.net/bug.php?id=60089&edit=1

 ID:                 60089
 Patch added by:     sala...@php.net
 Reported by:        sala...@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] sala...@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

Reply via email to