Replace mktime with timegm in rtc and fs driver

since kernel component should use UTC instead local time

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Icf939e1ab0af8e577105f539d2553bc67b3b3d10
This commit is contained in:
Xiang Xiao
2021-06-22 00:44:48 +08:00
committed by Alan Carvalho de Assis
parent b1cd825cac
commit ae9b5fd306
20 changed files with 38 additions and 39 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ int clock_basetime(FAR struct timespec *tp)
{
/* And use the broken-out time to initialize the system time */
tp->tv_sec = mktime(&rtctime);
tp->tv_sec = timegm(&rtctime);
tp->tv_nsec = nsecs;
}