From: Rosen Penev Date: Mon, 1 Feb 2021 00:15:52 +0000 (-0800) Subject: base-files: use hwclock --systz X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=157cd0bd97bcfec8a34d4ebb558f37bee4f0515f;p=openwrt%2Fstaging%2Fneocturne.git base-files: use hwclock --systz The date -k patch is non standard and will be removed in the next commit. Tested behavior to be identical with a simple C program: #define _GNU_SOURCE #include #include #include #include int main() { struct timezone tt; struct timezone tz; int a = syscall(SYS_gettimeofday, NULL, &tt); int b = gettimeofday(NULL, &tz); printf("%d - %d, %d\n", a, tt.tz_minuteswest, tt.tz_dsttime); printf("%d - %d, %d\n", b, tz.tz_minuteswest, tz.tz_dsttime); } Signed-off-by: Rosen Penev --- diff --git a/package/base-files/files/etc/init.d/system b/package/base-files/files/etc/init.d/system index 0e33c522b4..08cf86b97f 100755 --- a/package/base-files/files/etc/init.d/system +++ b/package/base-files/files/etc/init.d/system @@ -27,7 +27,7 @@ system_config() { ln -sf "/usr/share/zoneinfo/$zonename" /tmp/localtime && rm -f /tmp/TZ # apply timezone to kernel - busybox date -k + hwclock -u --systz } reload_service() {