Time::Piece->strptime()
時には、setlocaleしとかないと怒られることもある
Error parsing time at /path/to/Time/Piece.pm line 470.
#!/path/to/perl use Time::Piece; use POSIX qw( strftime locale_h); setlocale( LC_TIME, 'C' ); my $date = 'Mon Dec 17 22:19:36 2007 GMT'; my $fmt = '%a %b %d %T %Y %Z' my $t = Time::Piece->strptime( $date, $fmt ); print $t->datetime();