LUCI displayed time is off with recent 'master' build

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.

1 Like

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)

could really be because one use os uptime and others still use lua code... One of them doesn't follow timezone

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 there was a really large bunch of LuCI commits just before my build. Looking at the commit log, this seems like the most obvious candidate:;a=commit;h=c85af3d7618b55c499ce4bf58e3896068bd413ae

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,

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).

Front page is likely fixed a few minutes ago with;a=commitdiff;h=b27b5cfb51de91af90a05a6f31dba7511dedf8b7

I can try it out and let you know in about 20 minutes...

Time looks good on "OpenWrt SNAPSHOT r11413-f96af28272 / LuCI Master git-19.309.76501-b27b5cf".

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.