• 0 Posts
  • 2 Comments
Joined 3 years ago
cake
Cake day: July 1st, 2023

help-circle

  • I had a system that would fail if you ran it on leap days.

    It was used to calibrate equipment, and would generate a calibration certificate after the procedure was completed. One field in the certificate was “calibration due date”, which the program calculated by taking the current date and adding 1 to the year.

    Whoever wrote the program had enough foresight to use a datetime library that recognized “Feb 29, 2021” was not a valid date, but not enough foresight to use that library’s date math functions to add 365 days.

    The official solution was “just hold off on calibrations until tomorrow and we’ll fix that in the 2.0 calibration machine we’re working on.” The 2.0 machine was already years behind schedule, and I’m not sure it ever got completed after I left that company. I bet the bug still existed on Feb 29, 2024.