#41806 [Asn->Bgs]: milliseconds in date function
| From: | derick@php.net | Date: | Thu, 12 Jul 2007 19:04:50 +0000 |
| Subject: | #41806 [Asn->Bgs]: milliseconds in date function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-114983@lists.php.net to get a copy of this message | ||
ID: 41806
Updated by: derick@php.net
Reported By: lordi at msdi dot ca
-Status: Assigned
+Status: Bogus
Bug Type: Date/time related
Operating System: FreeBSD 6.2-RELEASE
PHP Version: 5.2.3
Assigned To: derick
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
This is correct, it states that the timestamp is an integer, and that
it defaults to the value of "time()" in the documentation. time() does
not return a float with fractions of a second:
http://no.php.net/date:
Returns a string formatted according to the given format string using
the given integer timestamp or the current time if no timestamp is
given. In other words, timestamp is optional and defaults to the value
of time().
Previous Comments:
------------------------------------------------------------------------
[2007-06-26 00:27:39] sniper@php.net
I think someone forgot to commit the part to the ext/date/lib/ side of
things when adding 'u' format as I can't see anywhere where t->f would
be set to anything but 0..
------------------------------------------------------------------------
[2007-06-25 23:53:12] lordi at msdi dot ca
Description:
------------
Hi,
the "u" parameters in the date function should return milliseconds, but
it always returns zeros.
Reproduce code:
---------------
date_default_timezone_set('America/Montreal');
echo date ('H:i:s:u');
Expected result:
----------------
19:50:39:123456
Actual result:
--------------
19:50:39:000000
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41806&edit=1