Dual-Life / Time-Piece

Object Oriented time objects
Other
15 stars 33 forks source link

It fails to parse some timestamps, but succeeds with others (no seconds) #60

Closed x-yuri closed 2 years ago

x-yuri commented 2 years ago
$ perl -e 'use Time::Piece; print Time::Piece->strptime("08/Sep/2022:23:59 +0300", "%d/%b/%Y:%H:%M %z"), "\n";'
Thu Sep  8 20:59:00 2022

$ perl -e 'use Time::Piece; print Time::Piece->strptime("08/Sep/2022:24:00 +0300", "%d/%b/%Y:%H:%M %z"), "\n";'
Error parsing time at /usr/lib/perl5/core_perl/Time/Piece.pm line 598.
x-yuri commented 2 years ago

My bad. The timestamps supposed to have hours and minutes. But in fact they have minutes and seconds. Never mind the issue.