You are here: Re: Formatting a date to RFC 822 « PHP Language « IT news, forums, messages
Re: Formatting a date to RFC 822

Posted by Simon Harris on 01/21/07 08:31

Rik,

Thank you very much for your explaination and solution! All working AOK now!
:)

Simon.

"Rik" <luiheidsgoeroe@hotmail.com> wrote in message
news:4ea72$45b2b4aa$8259c69c$6027@news1.tudelft.nl...
> 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
>
>
>
>

--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 2869 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!

 

Navigation:

[Reply to this 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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация