diff --git a/drivers/timers/pl031.c b/drivers/timers/pl031.c index a37fd5536c5..58c58d8bb5e 100644 --- a/drivers/timers/pl031.c +++ b/drivers/timers/pl031.c @@ -137,7 +137,7 @@ static int pl031_settime(FAR struct rtc_lowerhalf_s *lower, DEBUGASSERT(priv != NULL && rtctime != NULL); - time = mktime((FAR struct tm *)rtctime); + time = timegm((FAR struct tm *)rtctime); pl031_putreg(time, priv->base, PL031_RTCLR); return 0; @@ -191,7 +191,7 @@ static int pl031_setalarm(FAR struct rtc_lowerhalf_s *lower, priv->alarm.cb = alarminfo->cb; priv->alarm.priv = alarminfo->priv; - time = mktime((FAR struct tm *)&alarminfo->time); + time = timegm((FAR struct tm *)&alarminfo->time); pl031_putreg(time, priv->base, PL031_RTCMR); pl031_putreg(1, priv->base, PL031_RTCIMSC);