It's not in the Perl core, but I suggest installing and getting used to using DateTime and its ecosystem for your date and time processing.
Output:use strict; use warnings; use feature 'say'; use DateTime::Format::Strptime; my $date = '2017-07-19 10:07:42-0700'; my $parser = DateTime::Format::Strptime->new( pattern => '%F %T%z' ); my $datetime = $parser->parse_datetime( $date ); say $datetime->strftime('%a %b %d %T %Y'); __END__
$ perl 1193021.pl Wed Jul 19 10:07:42 2017
Hope this helps!
In reply to Re: Time::Piece reversibility
by 1nickt
in thread Time::Piece reversibility
by mla12
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |