I gave a link to the file so you could look at it: https://github.com/poblabs/weewx-belchertown/blob/master/skins/Belchertown/js/belchertown.js.tmpl
There is a definition of a "var d" at line 507. var d = new Date(); I still can't tell where it's getting its time from. On Sat, Mar 26, 2022 at 6:37 PM Doug Jenkins <[email protected]> wrote: > I think it is from the local client. The JavaScript is executed in the > browser. > > We need to see where "D" is initialized to make sure it is not using a web > api to obtain the time > > On Sat, Mar 26, 2022, 4:39 PM Eric K <[email protected]> wrote: > >> I have the Belchertown skin theme set to "auto" so it switches over to >> the dark theme around sunset. >> I have noted that the Belchertown skin switches over to the dark theme at >> large fractions of an hour before sunset actually occurs. >> Then, I got a report from a friend in the Eastern time zone, that the >> webpage theme switched to dark around 6:00pm Eastern time - around 2 hours >> early compared to the local sundown time (7:39pm Central) at my weewx >> weather station. >> He said he had not clicked the manual theme switch at the upper right >> corner of the Belchertown page. >> >> So, I started looking through the code to see how the theme change gets >> triggered. >> >> see: >> https://github.com/poblabs/weewx-belchertown/blob/master/skins/Belchertown/js/belchertown.js.tmpl >> >> Around line 507 the current hour and minute get assigned to variables >> with the expressions >> var nowHour = d.getHours(); >> var nowMinutes = d.getMinutes(); >> Where is the time being read from? >> 1. from the clock of the computer that weewx is running inside? >> 2. from the clock of webpage visitor's computer? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "weewx-user" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-user/7eb9e891-52a4-4e1f-9e04-e322bb2460bcn%40googlegroups.com >> <https://groups.google.com/d/msgid/weewx-user/7eb9e891-52a4-4e1f-9e04-e322bb2460bcn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "weewx-user" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/weewx-user/WfhDmYJZZZw/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/CACC0i0xDXGaD0%2BZZ0E-Cu3W6eo_QDOpbxoZ5m0tbe3OxKiCCAg%40mail.gmail.com > <https://groups.google.com/d/msgid/weewx-user/CACC0i0xDXGaD0%2BZZ0E-Cu3W6eo_QDOpbxoZ5m0tbe3OxKiCCAg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CADh_orh99A7ik-Jc6r6gurTVbG5wWjKg1uAa%2B1xhZ7QbLgefAw%40mail.gmail.com.
