in reply to Re^2: How to format dates prior to 1970?
in thread How to format dates prior to 1970?
Well, since the exception is apparently caused by Time::Piece (even though it's a core module), try using something else:
What does that do on your Windows system?use strict; use warnings; use feature 'say'; use DateTime::Format::Strptime; my $parser = DateTime::Format::Strptime->new(pattern => '%m/%d/%Y', on +_error => 'croak'); my $date = '05/10/1969'; my $dt = $parser->parse_datetime( $date ); say $dt->ymd;
The way forward always starts with a minimal test.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: How to format dates prior to 1970?
by Hanfresco (Novice) on Jul 10, 2017 at 16:11 UTC | |
by ikegami (Patriarch) on Jul 10, 2017 at 16:24 UTC |
In Section
Seekers of Perl Wisdom