#34755 [Opn->Csd]: Update strtotime() manual page for fractional seconds issue in PHP4
| From: | vrana@php.net | Date: | Thu, 13 Oct 2005 11:57:24 +0000 |
| Subject: | #34755 [Opn->Csd]: Update strtotime() manual page for fractional seconds issue in PHP4 | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969370576@lists.php.net to get a copy of this message | ||
ID: 34755
Updated by: vrana@php.net
Reported By: rob at akrabat dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: Irrelevant
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Before PHP 5.0, microseconds weren't allowed in the time, since PHP 5.0
they are allowed but ignored.
Previous Comments:
------------------------------------------------------------------------
[2005-10-06 14:07:30] rob at akrabat dot com
I only added this because you said in bug 28717: "Yup the docs for this
should be fixed too; but I'll do that after I
fixed the code for PHP 5 ;-)". I assumed it had been forgotten in the
general release process for PHP 5.
The current manual page says:
"The string to parse, according to the GNU Date Input Formats syntax"
This is linked to
http://www.gnu.org/software/tar/manual/html_chapter/tar_7.html
where is
it clear that fractional seconds are allowed.
I've added a "User Contributed Note" anyway so hopefully other people
won't waste as much time as I did wondering why it all went wrong when
I swapped from mssql to odbc for connection to a MS SQL Server :)
------------------------------------------------------------------------
[2005-10-06 13:02:47] derick@php.net
I don't think this necessary, nothing says that it should accept this
format at all anyway. We can probably document all the formats it
supports, but I'm not sure how useful that is...
------------------------------------------------------------------------
[2005-10-06 12:37:11] rob at akrabat dot com
Description:
------------
According to http://bugs.php.net/bug.php?id=28717
and
http://bugs.php.net/bug.php?id=27551 fractional
seconds are not
supported for the time parameter in strtotime().
Please update the manual page to add a warning to users of PHP 4.
Reproduce code:
---------------
N/A.
Code that reproduces the error is:
<?php
$date = '2000-01-01 00:00:00.000';
echo strtotime($date);
?>
In PHP 4 this code returns -1 as documented in the referenced bugs.
Expected result:
----------------
The manual page for strtotime() should have a warning about this issue
for PHP4.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34755&edit=1