mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
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:
committed by
Alan Carvalho de Assis
parent
b1cd825cac
commit
ae9b5fd306
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user