summaryrefslogtreecommitdiff
path: root/components/drivers/rtc/soft_rtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'components/drivers/rtc/soft_rtc.c')
-rw-r--r--components/drivers/rtc/soft_rtc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/drivers/rtc/soft_rtc.c b/components/drivers/rtc/soft_rtc.c
index 6a04314675..240301f683 100644
--- a/components/drivers/rtc/soft_rtc.c
+++ b/components/drivers/rtc/soft_rtc.c
@@ -8,7 +8,7 @@
* 2018-01-30 armink the first version
*/
-#include <time.h>
+#include <sys/time.h>
#include <string.h>
#include <rtthread.h>
#include <rtdevice.h>
@@ -126,7 +126,7 @@ int rt_soft_rtc_init(void)
#endif
init_tick = rt_tick_get();
- init_time = mktime(&time_new);
+ init_time = timegm(&time_new);
soft_rtc_dev.type = RT_Device_Class_RTC;