Skip to content

Commit 32bca79

Browse files
committed
[STM32L4XX] Init daylight saving time
1 parent a29e15e commit 32bca79

File tree

1 file changed

+2
-0
lines changed
  • hal/targets/hal/TARGET_STM/TARGET_STM32L4

1 file changed

+2
-0
lines changed

hal/targets/hal/TARGET_STM/TARGET_STM32L4/rtc_api.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ time_t rtc_read(void)
195195
timeinfo.tm_hour = timeStruct.Hours;
196196
timeinfo.tm_min = timeStruct.Minutes;
197197
timeinfo.tm_sec = timeStruct.Seconds;
198+
// Daylight Saving Time information is not available
199+
timeinfo.tm_isdst = -1;
198200

199201
// Convert to timestamp
200202
time_t t = mktime(&timeinfo);

0 commit comments

Comments
 (0)