21.02 /etc/TZ not read

I can't get the 21.02-snapshot-r16232-febf6db0d0 (EdgeRouter4) to read the /etc/tz file. The file exist and I can read it from PuTTy. It changes to the correct time zone every time I in LuCi system settings change time zone. I have also tried installing the Europe time zone package in hope for good luck but without any luck.

No matter what I do the system time in LuCi overview, date command and system log always show UTC time!? But the time in LuCi system time settings read the correct local time.

uci show system; readlink -f /etc/TZ ?

root@[sanitized]:~# uci show system; readlink -f /etc/TZ
system.ntp.server='0.openwrt.pool.ntp.org' '1.openwrt.pool.ntp.org' '2.openwrt.pool.ntp.org' '3.openwrt.pool.ntp.org'

I give you this also:

root@[sanitized]:~# cat /etc/TZ
root@[sanitized]:~# cat /tmp/TZ


The timezone function seems to be very unstable in OpenWRT?

Your configuration looks correct, it might be a bug of 21.02.

1 Like

I can do a bug report later today.

1 Like

I have been seeing the exact same issue, seems a target specific thing (also happens on my Octeon based EdgeRouter Lite):

1 Like

Ok, I can guarantee ER4 doesn’t have any RTC because when I installed my latest snapshot I didn’t have the internet line connected so NTP didn’t work. And then the time was mega much unsynced. I then synced it with the browser.
So whatever happens the clock need external input to be on time.

Do you know if your fault ended up as a bug report?

I don't think so, but in the thread I opened @ence posted and he might be onto something:

1 Like

I have now made a bug report of this.
FS#3944 - Octegon can't read timezone

1 Like

The /etc/TZ code seems to be from musl libc. Maybe you want to contact them.

musl homepage

They have a mailing list and irc for support. From my experience there are very knowledgeable and talented people on the mailing list, very helpful, too.

Kind regards,

What am I supposed to ask and what am I supposed to do with the answer? I don’t write programs any longer and I don’t have time to dig down into the source code of musl or OpenWRT. I am a user, I set the timezone in OpenWRT and it either works or doesn’t. If it doesn’t work for a lot of users it is probably a bug that our developers will solve a lot quicker than me.

Hi there,

Any progress on this?

Kind regards,

The bug report was untouched a couple of days ago.

The fault is not on my WRT3200ACM. It only showes up on ER4.

Now I have a logserver and the logs that are send to the logserver has time written as UTC+2h which are correct!?

So the fault seems to be the LuCi time functions in Overview and system logs are displayed wrong for ER4 (Octegon devices)???

LuCI just reports whatever the OS underneath passes on to it.

Probably so. But somewhere between luci and that system the timezone disappears.

But it doesn’t disappear from the system and out to the network to an external logserver!?

I noticed by chance today when I was connected to to router and was disabling the write log file setting with WinSCP that all files and folders on the router are stamped with UTC time also.

If I run date in the terminal it shows UTC time.

The only time I have found that is actually correct is the Local time in LuCi System general settings. Everything else is UTC time.

Is there a risk that the bug report won't be routed to the proper person(s) because of the typo in the platform name? (octeGon, vs octeon)
I don't know how this system routes reports, or if it even has a bot doing that task, but since some do, thought I should ask...

1 Like

To be honest I don’t have a clue how the bug report system works more than the “write a bug if something is wrong”?

But it feels that if the bug report system can’t handle this kind of typo not much will happen to many bug reports and I don’t think I even can change the bug report anyway after it’s made. I can only insert extra info.

Thanks for submitting it, though. I'm grateful for your effort - it's been annoying to see this bug on what otherwise has been a very nice platform in my experience.