STM32 RTC with HAL libraries
The solution is to call both GetTime and GetDate at the same time, If you call only GetTime it does not update correctly:

HAL_RTC_GetTime(&amp;hrtc, &amp;currTime, RTC_FORMAT_BIN);
HAL_RTC_GetDate(&amp;hrtc, &amp;currDate, RTC_FORMAT_BIN);


I don't know how they are connected, even more so because GetDate() is run after GetTime() and it still makes difference.