|
Posted by larry on 11/27/06 03:52
laredotornado@zipmail.com wrote:
> Hi,
>
> Using PHP 4.4.4 and I'm getting an odd time stamp attempting to make a
> php date. Here's the code
>
> $reqDate = date("Y-m-d", mktime(0, 0, 0, $y, $m, $d));
> $reqDateTS = strtotime($reqDate);
>
> If $y = 2006, $m = 12, and $d = 28, I get a negative value for
> $reqDateTS. What is wrong with the above statement?
>
> Thanks, - Dave
Date functions in PHP can be tricky (DST, GMT, etc. shudder),
did you read the manual on strtotime? It probably will help you.
http://us3.php.net/strtotime
Navigation:
[Reply to this message]
|