From 93185304e9a0f3a11e73ff7a06d92d0f066d80b1 Mon Sep 17 00:00:00 2001 From: vsfos Date: Sat, 2 Nov 2024 12:47:16 +0800 Subject: [PATCH] [shell/linux] setting tz in gettimeofday --- source/shell/sys/linux/vsf_linux.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/shell/sys/linux/vsf_linux.c b/source/shell/sys/linux/vsf_linux.c index 31c2868f1..b146d623b 100644 --- a/source/shell/sys/linux/vsf_linux.c +++ b/source/shell/sys/linux/vsf_linux.c @@ -3325,6 +3325,11 @@ int semop(int semid, struct sembuf *sops, size_t nsops) #if VSF_KERNEL_CFG_EDA_SUPPORT_TIMER == ENABLED int gettimeofday(struct timeval *tv, struct timezone *tz) { + if (tz != NULL) { + tz->tz_dsttime = 0; + tz->tz_minuteswest = 0; + } + #ifdef VSF_LINUX_CFG_RTC vsf_rtc_tm_t rtc_tm; vsf_rtc_get(&VSF_LINUX_CFG_RTC, &rtc_tm);