houseabsolute / Time-Local

Efficiently compute time from local and GMT time
https://metacpan.org/release/Time-Local/
Other
4 stars 11 forks source link

Accept February 29 #21

Closed ghen2 closed 6 months ago

ghen2 commented 6 months ago

Found an interesting bug today: Day '29' out of range 1..28 on February 29 :)

autarch commented 6 months ago

This shouldn't be necessary, as the code already accounts for leap years (just search for leap in Local.pm). Do you have a test that shows the bug?

ghen2 commented 6 months ago

You're right, the bug was in parsing a short date without year ("Thu Feb 29") in Postfix mailq output, where our code hardcoded a (non-leap) year :)