use DateTime::Format::RFC3339;
my $format = DateTime::Format::RFC3339->new();
my $dt = $format->parse_datetime('1996-08-29T00:00:00.0000Z');
say $dt->strftime('%d-%b-%Y'); # 29-Aug-1996
当我运行此脚本时,我收到以下错误:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/DateTime/Locale/Base.pm 第 1 行缺少右花括号或方括号,/usr/lib/ 处的行尾语法错误perl5/site_perl/5.8.8/i386-linux-thread-multi/DateTime/Locale/Base.pm 第 1 行,在 EOF
此外是从 cpan http://cpansearch.perl.org/src/DROLSKY/DateTime-Locale-0.45/lib/DateTime/Locale/Base.pmbase.pm
复制的