2009/8/29 Roman Makurin <[email protected]>: > Hi All. > > Is there any more or less standart way to convert string > formated according to rfc822 to unix time ?
Are you sure you want rfc822? This has been superceded by rfc2822 and rfc5322. As an example, rfc822 dates are like this: Date: 26 Aug 76 1429 EDT while rfc2822/5322 dates are like this: Date: Fri, 21 Nov 1997 09:55:06 -0600 Note the two digit year of rfc822 dates and the TLA timezone instead of numerical timezone. There are a few modules on CPAN for parsing these latter dates. Email::Date will read and write rfc 2822 type dates. I'm not quite sure what you mean by unix time, but if you mean the number of seconds since the epoch then Time::Unix does what you want. All these and more are available at http://search.cpan.org/ Philip -- "I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone." --Bjarne Stroustrup -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
