Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Problem with date()
July 20, 2005, 10:15 pm
rate this thread
Here is what I have (part, at least)
echo $dbResult[$i]["sender"] . ' ' . $dbResult[$i]["subject"] . ' ' .
$dbResult[$i]["timestamp"] . " " .
date("M j, Y, g:i a", $dbResult[$i]["timestamp"]) . '<br>';
Here is what it puts out (formatted here to make it easier for you to read)
NumEmail = 3
sheldonlg Third message 20050720060604 Jan 18, 2038, 9:14 pm
sheldonlg Long text 20050719200450 Jan 18, 2038, 9:14 pm
sheldonlg est 20050719200127 Jan 18, 2038, 9:14 pm
Why, for different timestamps, is it different?
Re: Problem with date()
Is *WHAT* different? The subject line?
The last field you printed ISN'T different for the 3 messages.
Did you leave the word NOT out of the question?
date() takes a UNIX timestamp as a second argument. What you have
printed in the third column (and fed as a second argument to date()
is not a UNIX timestamp and won't fit in 32 bits, so it overflowed.
Gordon L. Burditt