Reply to Re: Problem with date()

Your name:

Reply:


Posted by Gordon Burditt on 07/21/05 01:48

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

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

[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

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