in reply to Parsing Dates
Another alternative is Date::Manip, which I haven't used but is fairly popular (AFAIK). There is also the DateTime Project. Unless performance is critical and you know your data well, you should probably stick to one of these solutions, and not reinvent the date-parsing wheel.#!/usr/bin/perl -w use Date::Parse; my $time = str2time("Mon Apr 18 15:17:29 2005 EDT"); print "That date is ", localtime($time). " as PDT.\n"; print "That date is ", gmtime($time). " as GMT.\n"; __END__ That date is Mon Apr 18 12:17:29 2005 as PDT. That date is Mon Apr 18 19:17:29 2005 as GMT.
|
|---|