Skip to content

Commit

Permalink
rtc: change localtime to gmtime.
Browse files Browse the repository at this point in the history
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
  • Loading branch information
yangguangcai1 authored and xiaoxiang781216 committed Oct 15, 2024
1 parent 345e303 commit 3f08d4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testing/drivertest/drivertest_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ static void add_timeout(struct rtc_time * rtc_tm, const int delay)
timesp = timegm((struct tm *)rtc_tm);
timesp += delay;

tm = localtime(&timesp);
tm = gmtime(&timesp);
rtc_tm->tm_sec = tm->tm_sec;
rtc_tm->tm_min = tm->tm_min;
rtc_tm->tm_hour = tm->tm_hour;
Expand Down

0 comments on commit 3f08d4f

Please sign in to comment.