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 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/CACC0i0xDXGaD0%2BZZ0E-Cu3W6eo_QDOpbxoZ5m0tbe3OxKiCCAg%40mail.gmail.com.

Reply via email to