STM32 RTC - how to update?
You did not even bother to look at the reference manual (let me guess that the chip is STM32L011). Section 22.4.7. There is a magic sequence that has to be followed to update RTC registers. Everything can be changed at run-time.