guidoschmidt / circadian.el

Theme-switching for Emacs based on daytime
https://guidoschmidt.github.io/circadian.el
MIT License
169 stars 8 forks source link

UTC Time Only? #20

Closed jjuel closed 3 months ago

jjuel commented 5 years ago

This is mostly just a question. I was playing around with circadian and I love the idea of it! However, right now it is reading only UTC time. I have the time displayed in my emacs and that is the correct local time. But when setting circadian it was always my dark theme when it should have been the light theme. After playing around I realized it is UTC (which I am in UTC -6). So I would have to set the times to +6 hours from my actual time. It shouldn't be an issue, but wondered if there was a way to set the time circadian uses or where it derives its's time from?

utoku commented 2 years ago

circadian gets its time from solar.el which is a package included in the emacs release. That package decides what time it is for you from your coordinate settings, your longitude and latitude on earth, so having those set correctly is essential.

guidoschmidt commented 3 months ago

Just realized that circadian.el is only working if the calendar lat/lng values are set properly like

(setq calendar-latitude 49.329896)
(setq calendar-longitude 8.570925)

I'm currently working to support only string values for times on branch feature/ignore-sunrise-sunset-on-missing-calendar-settings. Shouldn't be too complicated, just filter :sunset and :sunrise entries in circadian-themes if one of the variables calendar-latitude or calendar-longitude is not set: circadian-themes-parse

Happy for anyone having a second look, my elisp is a bit outdated 😅