homepage Welcome to WebmasterWorld Guest from 54.197.65.82
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Going from RFC2822 date to epoch
The_Hat

10+ Year Member



 
Msg#: 4032795 posted 5:01 pm on Nov 27, 2009 (gmt 0)

Is there any existing php function to take a RFC2822 date (such as Tue, 24 Nov 2009 19:46:56 -0600) and convert it to epoch? Or do I just need to substr or explode it to convert it?

 

The_Hat

10+ Year Member



 
Msg#: 4032795 posted 9:37 pm on Nov 27, 2009 (gmt 0)

Derrrr.. $epoch = strtotime(RFC2822);

TGIF

rocknbil

WebmasterWorld Senior Member rocknbil us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4032795 posted 10:02 pm on Nov 27, 2009 (gmt 0)

select unix_timestamp('valid mysql date here')?

You'd have to reformat it using mysql date/time functions . . .

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved