Open mattn opened 4 years ago
Interesting, good catch! There is quite a bit of more error checking that needs to be added to that file (currently on the TODO list). I will add this and hopefully some more checks soon.
Another test case that apparently makes Time::Piece 1.3401 crash on Win32:
gmtime( -86400 )->strftime( '%Y-%m-%d' );
For what it’s worth, dates before 1 January 1970 are documented to fail on Win32 in Microsoft’s gmtime
docs. CPAN Testers results suggest that the above correctly produces 1969-12-31
in Cygwin.
I don’t run Windows myself, but from reading this patch, it does look like it would at least avoid the crash and I think it should be merged in.
On Windows, localtime(1586127053815)->strftime("%Y") always crash.