#29557 [Bgs->Opn]: strtotime error
| From: | derick@php.net | Date: | Mon, 09 Aug 2004 07:33:16 +0000 |
| Subject: | #29557 [Bgs->Opn]: strtotime error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64296@lists.php.net to get a copy of this message | ||
ID: 29557
Updated by: derick@php.net
Reported By: javier at evaloportunidades dot insp dot mx
-Status: Bogus
+Status: Open
Bug Type: *General Issues
Operating System: Debian GNU/Linux 3.0 2.6.7
PHP Version: 5.0.0
New Comment:
"now" returns midnight of the current day. I think this is wrong too.
Previous Comments:
------------------------------------------------------------------------
[2004-08-09 09:12:44] javier at evaloportunidades dot insp dot mx
But the problem is that even after n seconds with PHP 5.0.0 I get the
same result.
------------------------------------------------------------------------
[2004-08-08 23:04:54] iliaa@php.net
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
The code takes <1 second to run, so of course the timestamp
with 1 second precision will be the same.
------------------------------------------------------------------------
[2004-08-07 00:10:46] javier at evaloportunidades dot insp dot mx
Description:
------------
We use the strtotime function to get a value that is used as primary
key on a database table. But with PHP 5.0.0 the strtotime function is
returning duplicate values.
Here is the configure line:
-------
'./configure' '--disable-cli' '--disable-cgi'
'--without-pear'
'--without-mysql' '--with-pgsql'
'--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-memory-limit'
-------
With PHP 4 we didn't face this problem.
Cheers,
Javier
Reproduce code:
---------------
<?php
for ($i=0;$i<10;$i++)
{
$aux = strtotime("now");
echo $aux ."<br>";
}
?>
Actual result:
--------------
1091768400
1091768400
1091768400
1091768400
1091768400
1091768400
1091768400
1091768400
1091768400
1091768400
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29557&edit=1