Live data from Hacker News

Infinite loop in macOS Night Shift in the summer near the Arctic Circle

twitter.com

81–90 of 175 posts

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#81
post #76
post #54

I sometimes wonder how many bugs are lurking in systems using GPS for navigation at 180th meridian (where longitude goes from 180 to -180).

IIRC there was a bug in an early version of a certain fighter jet where it would go inverted when crossing the equator. Oops.

Urban legend or so it would appear.

https://www.ar15.com/forums/general/Urban_legend_about_F16__...?

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#82
post #4

'Falsehoods programmers believe about time: - Every day has a sunrise and a sunset'

Aside from having a falsehoods checklist that includes this, how would this be caught by a programmer who isn’t mindful of the fact that you don’t always have a sunset?

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#84
post #78

Earlier quoted context omitted.

Falsehood #2: Every day starts at 12:00 am midnight.

Because there is neither a 12:00 am, nor a 12:00 pm. One is 12 noon, the other is 12 midnight. AM and PM are "ante meridian" and "post meridian": before" and after . But 12 is on* the meridian; neither one. You can meaningfully say 12:00:01 am, or 11:59:59 pm, but for 12 sharp nobody can say whether am or pm is dark or day. Airlines schedule flights at 12:01 for this reason.

[deleted]

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#85
post #41

Earlier quoted context omitted.

Yep. And there also small regions that observe daylights savings WITHIN regions that don’t observe daylight savings WITHIn regions that do observe it. For example, in Indiana it is on a per county basis[1]. 1. https://www.timeanddate.com/time/us/indiana-time.html

Speaking of within, I fibbed slightly about Arizona. https://en.wikipedia.org/wiki/Time_in_Arizona The Navajo Nation is within Arizona's boundaries, and it does observe DST. And the Hopi Reservation is within the Navajo Nation, and it does not observe DST. And since Arizona is surrounded by California, Nevada, Utah, New Mexico, and Mexico, all of which do observe DST, that means you have an island of no-DST (Hopi) in…

How did we screw up time zones so much?

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#86
post #7
post #4

'Falsehoods programmers believe about time: - Every day has a sunrise and a sunset'

Right? I am reliably put into this weird emotional state of being simultaneously entertained and chagrined at the propensity for technologists (and I very much include myself in this criticism) to make these kinds of assumptions, and the edge-case bugs that fall out of them.

If we tried to get these thing 100% right we'd not have time for anything else. Punting is pragmatic.

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#89
post #26

Earlier quoted context omitted.

I think you're right, but that the tone I read in your words would prevent people from improving. Rather than "I'm so clever" it is more "this isn't complicated". One can argue they mean the same thing, but I'd say they mean different things if comparing to an outside scale. The solution to thinking you're so clever is to reduce your arrogance, but the solution to thinking problems are simple is to stop assuming any…

My favorite incorrect fact is that there are 24 timezones. In fact, the number of offsets from UTC fluctuates throughout the year (at least last I worked on scheduling in 2012. Back then it was either 39 or 40 depending on DST)

DST rules are just insane. I'm responsible for some code where I just drew the line and 40 some odd people in one of the Antarctic stations are just going to have to live with wrong time part of the year if they ever run my code. I'm not adding another code path and test case just because these people wanted their own special concept of time. I don't remember the pattern, but I think it was maybe a daylight savings time and then an extra one stacked in the middle.

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#90
post #78

Earlier quoted context omitted.

Falsehood #2: Every day starts at 12:00 am midnight.

Because there is neither a 12:00 am, nor a 12:00 pm. One is 12 noon, the other is 12 midnight. AM and PM are "ante meridian" and "post meridian": before" and after . But 12 is on* the meridian; neither one. You can meaningfully say 12:00:01 am, or 11:59:59 pm, but for 12 sharp nobody can say whether am or pm is dark or day. Airlines schedule flights at 12:01 for this reason.

Meridian in this context is noon. 12 “anti meridian” is 12 hours before noon. 12am. Which is exactly correct.

I’m no domain expert but I’m guessing flights are scheduled at 12:01am because people are bad at time. For instance some people would think 12am is the last minute of the previous day instead of the first minute of the next day. 12:01 removes the potential ambiguity.

Post reply on HN