[Solved] OpenWrt uses tz database?

Hi all,

I'm using OpenWRT 17 and 18 on various routers at home.

Since october 2019, daylight saving time was abolished in Brazil because the benefits became less than the economy, but the routers are not reflecting this. They are showing the time one hour plus the correct.

I looked for documentation in LuCI but there is no reference to, how it works on OpenWRT.

On tz database ( collaborative compilation of information about the world's time zones the information was corrected.

My doubt is if OpenWRT uses tz database?


You can use one of the Etc/GMT+X timezones, for example Etc/GMT+3 (BRT, Brasilia Time).

BTW OpenWrt 19.07 seems to display the correct time for Brazil anyway without using Etc/GMT+X.

1 Like

The tzdata package itself is normally not installed, and is not used.

LuCI, the GUI, has an abbreviated version of the IANA tz database, not the full tzdata database (with the change history).

Currently LuCI has the newest IANA timezone data, 2019c.
The Brazil change has been there since 2019b, applied in July 2019.

If you have an older firmware, you might still have the older LuCI.
Upgrade to 18.06.5 or newer.

You might also try upgrading LuCI packages (just "luci-base") in 17.01.x (as buildbot has built updated packages), but it might be better to build a personal firmware with the package.

The timezone in OpenWrt is actually just an option string in /etc/config/system, so you could just edit the file and correct your timezone. (you can see the current Brazil string from my commit above)

root@OpenWrt:~# head /etc/config/system

config system
        option hostname 'OpenWrt'
        option timezone 'EET-2EEST,M3.5.0/3,M10.5.0/4'
        option zonename 'Europe/Helsinki'

Thanks hnyman.
This is the information I'm looking for.

In older releases the configuration in /etc/config/system is set to:

        option zonename 'America/Sao Paulo'
        option timezone '<-03>3<-02>,M10.3.0/0,M2.3.0/0'

There is the DST configuration I'm looking for.
I changed it to:

        option zonename 'America/Sao Paulo'
        option timezone '<-03>3'

That resolved.


1 Like

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