Reply to Re: Problem with date()

Your name:

Reply:


Posted by Shelly on 07/21/05 01:56

"Gordon Burditt" <gordonb.0zad4@burditt.org> wrote in message
news:11dtl64ik972072@corp.supernews.com...
> >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?
>
> 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?

Yes, I did leave out NOT.

> 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.

If that is not the unix timestamp, but is the timestamp that appears when I
insert in the MySQL database, how do I get the unix timestamp from that?

Shelly

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация