drivers: rtc: stm32: fill all rtc_time fields
Set tm_yday and tm_isdst to -1 as theses values are unknown. Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
This commit is contained in:
parent
961c465efb
commit
b06a119f2f
1 changed files with 4 additions and 0 deletions
|
@ -290,6 +290,10 @@ static int rtc_stm32_get_time(const struct device *dev, struct rtc_time *timeptr
|
||||||
|
|
||||||
timeptr->tm_nsec = DIV_ROUND_CLOSEST(temp, cfg->sync_prescaler + 1);
|
timeptr->tm_nsec = DIV_ROUND_CLOSEST(temp, cfg->sync_prescaler + 1);
|
||||||
|
|
||||||
|
/* unknown values */
|
||||||
|
timeptr->tm_yday = -1;
|
||||||
|
timeptr->tm_isdst = -1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue