[openwrt/openwrt] base-files: uci-defaults: migrate time zonename on upgrade
LEDE Commits
lede-commits at lists.infradead.org
Sun Jan 11 10:13:57 PST 2026
hauke pushed a commit to openwrt/openwrt.git, branch openwrt-25.12:
https://git.openwrt.org/2c7bce72025c9b08dcf411447ab5ce418532f66f
commit 2c7bce72025c9b08dcf411447ab5ce418532f66f
Author: Eric Fahlgren <ericfahlgren at gmail.com>
AuthorDate: Fri Jan 9 17:32:37 2026 -0800
base-files: uci-defaults: migrate time zonename on upgrade
Timezone names no longer allow spaces, so older installations
upgrading to new will have their timezone reset to UTC.
For example, on 24.10:
$ uci get system. at system[0].zonename
America/Los Angeles
After upgrade to 25.12:
$ uci get system. at system[0].zonename
UTC
Add a migration script to edit zonename on first boot.
Fixes: https://github.com/openwrt/luci/commit/d9a087e4
Link: https://github.com/openwrt/luci/issues/8203
Link: https://forum.openwrt.org/t/openwrt-25-12-0-rc1-release-candidate/244364/98
Signed-off-by: Eric Fahlgren <ericfahlgren at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21482
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
(cherry picked from commit 54c7ad8d8ad8046a31e7ef88e1184f9f722ba9fe)
---
package/base-files/files/etc/uci-defaults/15_migrate-time-zonename | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/base-files/files/etc/uci-defaults/15_migrate-time-zonename b/package/base-files/files/etc/uci-defaults/15_migrate-time-zonename
new file mode 100644
index 0000000000..1ac93ea552
--- /dev/null
+++ b/package/base-files/files/etc/uci-defaults/15_migrate-time-zonename
@@ -0,0 +1,6 @@
+zonename="$(uci -q get system. at system[0].zonename)"
+case "$zonename" in
+ *[[:space:]]*) uci set system. at system[0].zonename="${zonename// /_}" ;;
+esac
+
+exit 0
More information about the lede-commits
mailing list