You have 90 minutes in an hour on your clock?
if (minutes > 0x59) minutes = 0;
and 36 hours in a day
if (hours > 0x23) hours = 0;
Why do you not use the RTC.set/RTC.write instead of your own code?
At least it should be move out of the while (!digitalRead(Sw0)) loop so the time only gets written back after the set time switch is released.