#19515 [Opn->Bgs]: Parameters of function strtotime() seem wrong
| From: | cynic@php.net | Date: | Fri, 20 Sep 2002 07:27:38 +0000 |
| Subject: | #19515 [Opn->Bgs]: Parameters of function strtotime() seem wrong | ||
| References: | 1 | Groups: | php.bugs php.doc |
| Request: | Send a blank email to php-bugs+get-19838@lists.php.net to get a copy of this message | ||
ID: 19515
Updated by: cynic@php.net
Reported By: dallas@php.net
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
PHP Version: 4CVS-2002-09-20
New Comment:
"Jan 1 1970" is an absolute date. how do you want to change it's
timestamp?
reread the docs.
Previous Comments:
------------------------------------------------------------------------
[2002-09-20 02:23:34] dallas@php.net
Function strtotime() is defined as below:
int strtotime ( string time [, int now])
But when I try this function, whatever value I provide to 'now' seem no
affect to the result at all.
I've tried following example:
echo strtotime("Jan 1 1970"), "\n";
echo strtotime("Jan 1 1970", 10000), "\n";
echo strtotime("Jan 1 1970", time()), "\n";
and the result is(PHP 4.0.6, 4.2.3, 4.3.0, Linux, Windows):
18000
18000
18000
I'm in GMT-0500, so I guess the result is correct. But what exactly
the parameter 'now' for? I supposed strtotime() function behave
correctly, so 'now' is just meaningless.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19515&edit=1