4 ms·
To expand a bit on why the localtime() is not enough, two factors are at play. First, the solar noon can be as much as two hours displaced from the timezone. Th
by kharms 11y ago
To expand a bit on why the localtime() is not enough, two factors are at play. First, the solar noon can be as much as two hours displaced from the timezone. This is basically time zone vs longitude. Second, depending on time of year and attitude you can go from having no daylight in the winter to no darkness in the summer.
Solar noon details here: http://blog.poormansmath.net/images/SolarTimeVsStandardTimeV2.png http://blog.poormansmath.net/images/SolarTimeVsStandardTimeV...
- detaro 11y ago> Second, depending on time of year and attitude you can go from having no daylight in the winter to no darkness in the summer. Isn't this a perfect example where using more than localtime() is pointless? Just because it's dark all the time outside you don't want your screen to be red-ish all the time. And in summer you want the effect if you try to sleep, even if the sun is still relatively high.
- cstrahan 11y agoI actually like that it's "red-ish all the time" because I'd prefer that my circadian rhythm match the outside lighting conditions. My eyes (and most others I know) adjust, and it no longer looks orange (in fact, non-adjusted screens start to look blue). Of course the lights around my apartment adjust too, otherwise the screen would continue to look off. I generally have a hard time getting to sleep, and most mornings feel like I've been run over by a steamroller, so I don't mind a little red tint if it makes even a tiny difference in the quality of my sleep.
- diqu 11y agoSaying you want your circadian rhythm match the outside light, then adding that you generally can't get to sleep while being steamrolled in the morning, sounds an aweful lot like you're not sleeping in accordance with your biological clock. Are you aware of delayed sleep phase syndrom?[0]? I have the same "issue" and it took me years to find a name for it, so I'd rather throw this at you, even if you knew. [0] https://en.wikipedia.org/wiki/Delayed_sleep_phase_disorder https://en.wikipedia.org/wiki/Delayed_sleep_phase_disorder
- cvwright 11y agoYeah, this is why I was confused. I can understand wanting the screen to tint reddish when it's 9 or 10 pm, because I should be going to bed soon. I don't necessarily want it changing colors at 4pm when it starts getting dark here in the winter. At 4:00, I still need to be up for another 6-10 hours.
- eropple 11y agoFWIW, until I went in manually, I was monkeying with f.lux around Daylight Savings switches specifically to make it show up the way I wanted it. 4PM is a good time for it to start for me, because it heads off eyestrain at the pass before the sun starts getting low enough and yet my work time's still ongoing. YM, of course, MV.