From 562861dde6ae7f56e03a5a0f7725a553b39e261a Mon Sep 17 00:00:00 2001 From: quan Date: Sat, 11 Jun 2022 14:52:18 +0900 Subject: [PATCH] fix `JST` time zone error 1. line 1393: A typo `UCT` to `UTC` 2. line 1394: Write correct `tmpstr` which should be `JST-9` to /etc/TZ See discussion on the SNBForums https://www.snbforums.com/threads/chaotic-utc-and-local-time-in-merlin.79268/post-767654 Signed-off-by: quan --- release/src/router/rc/common.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/release/src/router/rc/common.c b/release/src/router/rc/common.c index 005cd0a65cda..776918744932 100644 --- a/release/src/router/rc/common.c +++ b/release/src/router/rc/common.c @@ -1389,8 +1389,11 @@ void time_zone_x_mapping(void) nvram_set("time_zone_x", tmpstr); /* special mapping */ - if (nvram_match("time_zone", "JST")) - nvram_set("time_zone_x", "UCT-9"); + if (nvram_match("time_zone", "JST")) { + nvram_set("time_zone_x", "UTC-9"); + snprintf (tmpstr, sizeof(tmpstr), "%s", "JST-9"); + } + #if 0 else if (nvram_match("time_zone", "TST-10TDT")) nvram_set("time_zone_x", "UCT-10");