Re: date problem
| From: | Curt Zirzow | Date: | Wed, 24 Sep 2003 18:22:28 +0000 |
| Subject: | Re: date problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163793@lists.php.net to get a copy of this message | ||
* Thus wrote Shaun (shaun@mania.plus.com):
> Hi,
>
> Why does the following code print '00', surely it should print '08',
> I'm
> baffled!
>
> date("H", mktime(8, 0, 0, 0, 0, 0));
<?php
echo date("r", mktime(8,0,0,0,0,0)), "\n";
//Wed, 31 Dec 1969 23:59:59 +0000
echo date("r", mktime(0,0,0,0,0,0)), "\n";
//Wed, 31 Dec 1969 23:59:59 +0000
echo date("r", mktime(8,0,0,1,1,0)), "\n";
//Sat, 1 Jan 2000 08:00:00 +0000
?>
kinda wierd, I say blame it on the y1969 bug.
make sure your day and month don't go backwards, that seems to be
what the problem is.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."