in reply to Re: Question regarding Time::Piece and timezones
in thread Question regarding Time::Piece and timezones
my $t = localtime;
There are more moving parts than the minimum required to show the problem, which is surprising in such a short example script! The issue could as well have been illustrated using:
use strict; use warnings; use Time::Piece; my $pattern = "%a, %d %b %Y %T %Z"; my $str = 'Wed, 13 Jan 2021 17:22:23 CST'; my $u = Time::Piece->strptime($str, $pattern); print "Time is:\n", $u->strftime($pattern), "\n";
which doesn't give the trace back, but does show the error:
Error parsing time at d:/berrybrew/5.30.1_32/perl/lib/Time/Piece.pm li +ne 597.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Question regarding Time::Piece and timezones
by Marshall (Canon) on Jan 14, 2021 at 12:26 UTC | |
by hippo (Archbishop) on Jan 14, 2021 at 13:25 UTC | |
by atcroft (Abbot) on Jan 15, 2021 at 00:03 UTC | |
by Bod (Parson) on Jan 14, 2021 at 23:55 UTC | |
by jszinger (Scribe) on Jan 15, 2021 at 18:06 UTC | |
by jszinger (Scribe) on Jan 26, 2021 at 17:14 UTC | |
by Marshall (Canon) on Jan 30, 2021 at 02:20 UTC |