diff --git a/sys/include/rtc_utils.h b/sys/include/rtc_utils.h index cd9d197bd0cb..88a983502ab7 100644 --- a/sys/include/rtc_utils.h +++ b/sys/include/rtc_utils.h @@ -69,7 +69,7 @@ int rtc_tm_compare(const struct tm *a, const struct tm *b); * * @return elapsed seconds since `RIOT_EPOCH` */ -uint32_t rtc_mktime(struct tm *t); +uint32_t rtc_mktime(const struct tm *t); /** * @brief Converts an RTC timestamp into a time struct. diff --git a/sys/rtc_utils/rtc_utils.c b/sys/rtc_utils/rtc_utils.c index 6c1c792179c3..4c2c10a66144 100644 --- a/sys/rtc_utils/rtc_utils.c +++ b/sys/rtc_utils/rtc_utils.c @@ -177,7 +177,7 @@ void rtc_tm_normalize(struct tm *t) #endif } -uint32_t rtc_mktime(struct tm *t) +uint32_t rtc_mktime(const struct tm *t) { unsigned year = t->tm_year + 1900; uint32_t time = t->tm_sec