STM32F103C8T6 RTC year keeps defaulting to 2000, time however OK
I don’t know if this is still true but, a while back the initialization code for the RTC would set the date. There was no “unitialized” flags being used to bypass the setting of the date. It seemed like an odd choice and the problem was sent to ST, but I never followed the issue.
Put some break points in the startup code and see if the RTC has the proper date, then step through. It sounds like that init code is still around.
Andrei