Anyway, kill the DST with fire.
The 1 Hour per Year Bug, but only in Pacific time
61–65 of 65 posts
Re: The 1 Hour per Year Bug, but only in Pacific time
#62Re: The 1 Hour per Year Bug, but only in Pacific time
#63My favorite DST bug was a system that was supposed to run every few seconds taking a nap for an hour. It was an event loop thingy that had a few different types of tasks it might do. When it finished one of those tasks it'd record (in time-zone-local time) the time it completed it. When the event loop ran, it'd check that timestamp against now to see whether the task needed doing. In comes the DST rollback. At 1:59 A…
All such delays should be done uses monotonic clocks. This simplistic solution runs still into problems when you have long delays, especially if the system suspends and/or power cycles. Or if you want the interval to always expire at some wall clock aligned time, such as every half hour on the half hour.
Re: The 1 Hour per Year Bug, but only in Pacific time
#64Re: The 1 Hour per Year Bug, but only in Pacific time
#65Earlier quoted context omitted.
All such delays should be done uses monotonic clocks. This simplistic solution runs still into problems when you have long delays, especially if the system suspends and/or power cycles. Or if you want the interval to always expire at some wall clock aligned time, such as every half hour on the half hour.
A monotonic clock is a bit trickier when dealing with timestamps being written to / read from a separate database, but I agree with the sentiment. Hence why the chosen implementation was buggy :-)