Ask HN: Did you encounter any leap year bugs today?
524 pointsAfter a frantic scramble this morning, our billing team has finished patching a bug which erroneously was charging our monthly subscribers for an extra day.
All test suites are passing now, and SRE has scheduled a postmortem after the QA confirms the fix in 2028.
Comments (481) 159 threads
Earlier commentsThe most likely thing to me would be that it attempted to issue a 1-year-long certificate, but naively produced a date of Feb 29, 2025.
Dates in certificates are encoded as `YYMMDDhhmmssZ` so it would certainly be possible to produce a certificate with an invalid date.
The confusing part, to me, is that Python would consider the above string to be parsed into a date in the first place, given that it has no year.
datetime.strptime('Feb 29 13:37:06.942', '%b %d %H:%M:%S.%f')
edit: added code example. import datetime from datetime first obvi
Edit: no it's not, it's absolutely correct, leap years just aren't as simple as I thought!
Continue this thread — 1 reply
Continue this thread — 2 replies
The funny thing is that the list is prefaced by a banner saying that this is a known bug, and the results actually refer to the 29th.
Interesting way to workaround a bug :)
All comments shown.
Couldn't load more comments. Check your connection and try again.