I've got a vagrant instance where I can build new images, so I am probably building them a lot more than I need to. When I built a new image today (for a EA6850v3) the time on the main Luci page showed a time 4 hours later than what I see if I log into the system and type 'date'. I'm set up on the Los Angeles time zone. This is for a build I did today.
I reverted to the last snapshot build via 'advanced-reboot' (r11365-df60a0852c) and the time is shown correctly.
It is likely due to recent JavaScript hased LuCI changes by @jow
I already messaged to him about a changed date format (US date notation) but did not notice the timezone difference.
In LuCI the main overview shows with doubly applied timezone correction, two hours ahead of the right time. But system/system shows the right time ( the same as console date command)
It is seemingly narrow regression range in the main code, as r11367-c2675bb0ce / 2019-11-01 18:16 already shows the wrong time for me (and above 11365 was said to be ok). My faulty build was done with:
main 2019-11-01 c2675bb rpcd: update to latest Git HEAD
luci 2019-11-01 af5dc26 luci-mod-system: flash.js: upon sysupgrad
But "localtime" defined there comes actually from rpc/ubus (ubus call system info) and gets formatted with javascript toLocaleString(), and I have not tried to figure out where the timezone gets applied twice(?). _('Local Time'), systeminfo.localtime ? (new Date(systeminfo.localtime * 1000)).toLocaleString() : null,
EDIT:
Likely the ubus call already gives local adjusted time, and then also the toLocaleString applies the timezone correction that it thinks is right. Based on web docs on toLocaleString, it seems to apply the timezone again based on browser's own view on timezone (and assumes UTC time as the input).