3 ms·
Clock rollovers can be interesting. Some time back I did work at a devices startup processing data collected from trial runs. For some reason an earlier devel
by dredmorbius 5y ago
Clock rollovers can be interesting.
Some time back I did work at a devices startup processing data collected from trial runs. For some reason an earlier developer had chosen to use time-of-day, in seconds, rather than elapsed time, as the index for data recording. I'd registered this as a poor design decision, though it was difficult to articulate why.
That argument became far easier after a field trial spanned midnight, and the data series iterated from 86,400 to 0.
On the other hand, I've never had trouble remembering just how many seconds (or minutes) there are in a day, since.
- dmurray 5y ago> On the other hand, I've never had trouble remembering just how many seconds (or minutes) there are in a day, since. Not everyone is so fortunate: https://news.ycombinator.com/item?id=7717414 https://news.ycombinator.com/item?id=7717414
- dredmorbius 5y agoOuch!
- nicoburns 5y agoHuh, that's an old thread. Was quite confused when the "upcoming PHP 5.6 release" was mentioned!
- ed25519FUUU 5y agoThis is why it’s better to express time in seconds using multiplication. Easier to write, easier to review, and easier to change. (60 * 60 * 24) // 1 day (60 * 60 * 12) // 12 hours (60 * 5) // 5 minutes
- dredmorbius 5y agoIt's better yet to use a specific time or callendrical function if what you're accounting for is a specific clock or calendar interval. Not all days have precisely 86,400 seconds. For longer intervals, not all months have 28, 29, 30, 31, 30.43685, whatever, days. Not all years have 365 or 366 days, etc. Pull out your copy of "Myths Programmers Believe About Time" and read it, hard. It will bite.
- bogeholm 5y agoThe term ‘clock rollover’ reminds me of the 2007 incident where 6 F-22’s crossed the date line: > “…At the international date line, whoops, all systems dumped and when I say all systems, I mean all systems, their navigation, part of their communications, their fuel systems.” https://www.defenseindustrydaily.com/f22-squadron-shot-down-by-the-international-date-line-03087/ https://www.defenseindustrydaily.com/f22-squadron-shot-down-...
- kolinko 5y agoI would assume fighter jets don't update timezones and just keep time in sync with their home bases...
- ChuckNorris89 5y agoBut what if fighter jets move from base to base and each base refers only in their local time zone to the pilot on radio.
- kolinko 5y agoI would expect bases to communicate in UTC, or have timezones embedded in each message... Now I'm really curious of how time is managed in jetfighters, but couldn't find a good article on the subject.