Is there a way to convert from/to RFC 822 dates without using the DateTime module?

I'm working on a program to process podcast RSS feeds and I'm running into a minor problem with the pubDate element. I want to determine whether or not to download the podcast based on the date that it was published, but all of the feeds publish in different time zones. So, I need to convert the pubDate (formatted per RFC 822) to my local time in order to use it.

One solution involves the DateTime module, but I'd like to avoid additional dependencies, if possible.

Another solution is to just use the shell's date command, which recognizes the RFC 822 date format and can convert it to another format for me.
For example:

use POSIX 'strftime'; my $pubdate = 'Thu, 11 Jun 2009 11:50:00 PDT'; my $pubdate_here = strftime("%D %T", localtime(`date +"%s" --date="$pu +bdate"`));
This is the solution I'll use if there isn't another option, but it seems like there must be something built into Perl that I'm missing.

Thank you.
--
-- Ghodmode
Blessed is he who has found his work; let him ask no other blessedness.
-- Thomas Carlyle

In reply to RFC 822 date manipulation without DateTime module? by GhodMode

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.