Lurker News
After 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 comments
nameoda#
My monthly bus passes for both February and March did not work in Dallas today. The driver was aware of the issue and just waved me in.
jonathantf22 replies#
Our Sophos anti-virus at work blocked access to every website this morning because of the leap year, had to disable the web filtering to get us back up and running.
fostware#
Yeah, so many "untrusted website" screenshots in the office chat. Half a productive day for staff in Australia
mcpherrinm#
Does anyone affected have a copy of one of the affected certificates? I'd be interested in seeing more detail on what went wrong.

The 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.

bregma5 replies#
Python.

    cls = , data_string = 'Feb 29 04:55:03.687' format = '%b %d %H:%M:%S.%f'
    E       ValueError: day is out of range for month
herpderperator#
Interesting... I suppose that is because there is no year? What year does it default to? Can you show your exact line of code?
derefr#
That doesn’t seem incorrect; given that no year is specified, it seems like it’s evaluating the constraint in the context of an implicit default year. (1970? 0CE?)

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.

nicholasjarnold#
confirmed. and interesting/unexpected! this breaks:

datetime.strptime('Feb 29 13:37:06.942', '%b %d %H:%M:%S.%f')
edit: added code example. import datetime from datetime first obvi

LeoPanthera#
That's because you didn't specify a year.
ptx1 reply#
As mentioned by sibling comments, it's because you're not specifying a year. If you change the day to the 28th you'll see that it defaults to the year 1900:

  >>> datetime.strptime('Feb 28 04:55:03.687', '%b %d %H:%M:%S.%f')
  datetime.datetime(1900, 2, 28, 4, 55, 3, 687000)

  >>> datetime.strptime('Feb 28 13:37:06.942', '%b %d %H:%M:%S.%f')
  datetime.datetime(1900, 2, 28, 13, 37, 6, 942000)
OJFord2 replies#
That makes it weird though, because 1900 was a leap year? I sort of get it, but it's a slightly odd and inconsistent decision.

Edit: no it's not, it's absolutely correct, leap years just aren't as simple as I thought!

pxx1 reply#
1900 was not a leap year... It's 0 mod 4, yes, but it's 0 mod 100 and not 0 mod 400

Continue this thread — 1 reply

pizza2342 replies#
Yes, an amusing one: the Android app for the Berlin public transport, on the 29th, listed the results with the date of the previous day (28th).

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 :)

rahimnathwani#
The app was probably designed to be able to show an emergency banner if ever needed. Easier to change that message than fix a complicated API.
pizza234#
Yes :)

Load more comments