How to convert RSS dates to second since epoch?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Duke of Hazard

    How to convert RSS dates to second since epoch?

    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

    #2
    Re: How to convert RSS dates to second since epoch?

    ..oO(Duke of Hazard)
    >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

    Comment

    • Toby A Inkster

      #3
      Re: How to convert RSS dates to second since epoch?

      Duke of Hazard wrote:
      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

      Comment

      Working...