base-files: fix luci TZ default show zonename
authorJiale Liu <admin@licsber.site>
Sun, 14 Apr 2024 16:27:49 +0000 (00:27 +0800)
committerJohn Crispin <john@phrozen.org>
Thu, 12 Dec 2024 18:54:09 +0000 (19:54 +0100)
fix default timezone to correct GMT0,
origin value 'UTC' is zonename, not timezone.

Signed-off-by: Jiale Liu <admin@licsber.site>
Link: https://github.com/openwrt/openwrt/pull/15128
Signed-off-by: John Crispin <john@phrozen.org>
package/base-files/files/bin/config_generate
package/base-files/files/etc/init.d/system

index ca40a62cd4c9ea5c2e31f26b343998f5415c6f74..fecf82fcaa6014064c0f95a7b35e0e18ffd108c3 100755 (executable)
@@ -312,7 +312,8 @@ generate_static_system() {
                delete system.@system[0]
                add system system
                set system.@system[-1].hostname='OpenWrt'
-               set system.@system[-1].timezone='UTC'
+               set system.@system[-1].timezone='GMT0'
+               set system.@system[-1].zonename='UTC'
                set system.@system[-1].ttylogin='0'
                set system.@system[-1].log_size='128'
                set system.@system[-1].urandom_seed='0'
index dcfc2616c6d84467bd0c1b0a6f3b526c7a81c360..cff2d87072f4c5ce959eedfb9cf7607741c644a0 100755 (executable)
@@ -9,8 +9,8 @@ validate_system_section() {
                'hostname:string:OpenWrt' \
                'conloglevel:uinteger' \
                'buffersize:uinteger' \
-               'timezone:string:UTC' \
-               'zonename:string'
+               'timezone:string:GMT0' \
+               'zonename:string:UTC'
 }
 
 system_config() {