Connecting Tech Pros Worldwide Forums | Help | Site Map

How to convert RSS dates to second since epoch?

Duke of Hazard
Guest
 
Posts: n/a
#1: Mar 29 '08
Any suggestions apart from brute force to convert a date like this:

2008-03-23T20:58:50-04:00

to seconds since 1970 ?


Michael Fesser
Guest
 
Posts: n/a
#2: Mar 29 '08

re: How to convert RSS dates to second since epoch?


..oO(Duke of Hazard)
Quote:
>Any suggestions apart from brute force to convert a date like this:
>
>2008-03-23T20:58:50-04:00
>
>to seconds since 1970 ?
strtotime()

Micha
Toby A Inkster
Guest
 
Posts: n/a
#3: Mar 30 '08

re: How to convert RSS dates to second since epoch?


Duke of Hazard wrote:
Quote:
2008-03-23T20:58:50-04:00
This is not an RSS date. RSS uses RFC-822-style dates, such as:

Sun, 30 Mar 2008 19:03:40 +0100

The date format you posted is and ISO-8601 date, as used by e.g. Atom.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 4 days, 5:22.]

Cognition 0.1 Alpha 6
http://tobyinkster.co.uk/blog/2008/0...nition-alpha6/
Closed Thread