Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
    print $str, "\n";
    my $strtime = Time::Piece->strptime($str, $fmt);
    print $strtime->strftime($fmt), "\n";
    
  2. or download this
    use warnings;
    use strict;
    ...
    print "$str\n";
    my $dt2 = $strp->parse_datetime($str);
    print $dt2->rfc3339, "\n";