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 <unistd.h>
 #include <stdio.h>
 #include <sys/time.h>
 #include <sys/syscall.h>

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 <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2021-01-31 16:15:52 -08:00 committed by Hauke Mehrtens
parent da283a8f2c
commit 157cd0bd97
1 changed files with 1 additions and 1 deletions

View File

@ -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() {