Is there a reason you aren't using one of the RTC libraries? You can certainly do it yourself, but it seems like the hard way to do it.
Is there a reason you aren't using one of the RTC libraries? You can certainly do it yourself, but it seems like the hard way to do it.