Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

And it's not just "sunset + X minutes" where X would be a constant. In the winter this X is much shorter than in the summer.

For me X is then a "travelling" value which in the winter is at 1/3 between sunset (0°) and civil dusk (-6°), and in the summer it goes up to 2/3. Calculated as the moment when the blinds go down.

I'm using https://astral.readthedocs.io for this.



What's the reasoning behind using a different value in winter than summer? Your winter value roughly corresponds to -2°, your summer value to -4°.


You made me check the code and actually I have it the other way around (and with different ratios, winter=-6°, summer=-2°), because else the blinds would go down too late in the summer (after 22:00).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: