1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-14 17:13:50 +01:00

sys/rtc_utils: make parameter to rtc_mktime() const

This commit is contained in:
Benjamin Valentin 2024-12-18 22:08:32 +01:00
parent a4026b78b8
commit ba0060d3a6
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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