I have my code correctly set up to adjust the time on a DS3231 with a button press.
Typical lines include:
rtc.adjust(rtc.now()+3600); //add one hour to time
and
rtc.adjust(rtc.now()+60); //add one minute to time
However, I am finding it difficult to set the seconds to 0.
Every time I button press for +60 I would like to set the seconds to 0. To overcome the issue of +60 when on 59 secconds and the time jumping 2 minutes (120 seconds).
What can I use in conjunction with rtc.adjust to set seconds to 0 on a button press? Is there a rounding function as part of the library? Or what other methods could I use?
Any help, guidance or direction would be greatly appreciated.