Reply to Re: Formatting a date to RFC 822

Your name:

Reply:


Posted by Rik on 01/21/07 00:35

Simon Harris wrote:
> I just tried this...
> strftime("%a, %d %b %Y %H:%M:%S %z",row{'dateUpdated'}) which did the
> same thing.
>
> Dont geddit.

date() expects a timestamp, which is an integer. You 'date' string was cast
to an integer (2006), and 2006 seconds is 33 minutes and 36 seconds. Add
that to the epoch (01-01-1970), adjust for the timezone (+ 1 hour) and
voil�, that's the date you got. You have to get your string to a timestamp,
and as it's mysql, I'd suggest you let mysql handle it:
SELECT UNIX_TIMESTAMP(`date`) as 'date; etc....
And you're good to go.
--
Grtz,

Rik Wasmus

[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

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