Bug #55743 [Com]: date u - Microseconds (added in PHP 5.2.2)
| From: | jsuprock at gmail dot com | Date: | Thu, 02 Aug 2012 14:03:28 +0000 |
| Subject: | Bug #55743 [Com]: date u - Microseconds (added in PHP 5.2.2) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-172390@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55743&edit=1
ID: 55743
Comment by: jsuprock at gmail dot com
Reported by: bugzilla33 at gmail dot com
Summary: date u - Microseconds (added in PHP 5.2.2)
Status: Not a bug
Type: Bug
Package: Date/time related
Operating System: All
PHP Version: 5.4.0beta1
Block user comment: N
Private report: N
New Comment:
Hi, I've experienced this as well, but I do follow your explanation. However,
what is the reason for the documentation on this page still being incorrect?
http://us2.php.net/manual/en/function.date.php
It has been almost a year, and the page still suggests that the "u" formatter
will work with date().
Thank you,
John
Previous Comments:
------------------------------------------------------------------------
[2011-09-23 13:29:55] bjori@php.net
"Note:
Since this function only accepts integer timestamps the u format character is
only useful when using the date_format() function with user based timestamps
created with date_create()."
See http://php.net/date
------------------------------------------------------------------------
[2011-09-20 18:42:46] bugzilla33 at gmail dot com
Description:
------------
http://pl.php.net/manual/en/function.date.php
http://pl.php.net/manual/en/function.gmdate.php
Specification:
u - Microseconds (added in PHP 5.2.2) - Example: 654321
u formater do not works because second parameter (called timestamp) is int type
u formater will works if second parameter (called timestamp) is double (compatible with current int)
Please remove u formater useless or fix specyfication
or a better fix it int -> double (second parameter)
Test script:
---------------
<?=gmdate('u',12.13)?>
<?=date('u',12.13)?>
Expected result:
----------------
130000
130000
Actual result:
--------------
000000
000000
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55743&edit=1