I seem to be running into a problem where the date() function appears not to differentiate properly between unix timestamps.
For example, the code:
<?php
$seconds = 1054278483; echo "$seconds<br>"; echo date("d-m-Y H:m:s", $seconds); echo "<br><br>";
$seconds = ($seconds - 60); echo "$seconds<br>"; echo date("d-m-Y H:m:s", $seconds); echo "<br><br>";
?>
outputs
1054278483 30-05-2003 02:05:03
1054278423 30-05-2003 02:05:03
I would expect the second date() to output 30-05-2003 02:04:03 as the second timestamp is exactly 60 seconds behind the first, but I might be missing something. I see the same behavior on two redhat linux machines running Apache 2.0.40 + PHP 4.2.2 and Apache 1.3.26 + PHP 4.3.2 respectively. Any ideas?
Thanks,
Garrick Linn
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php