Arduino Function: rtc.setHour


This method sets hour into RTC. Hour parameter can be vary from 0 to 23 or from 0 to 12 according to time representation mode. If you use TIME_H24 mode set meridian parameter to 0, if instead use TIME_H12 mode set meridian parameter according to time (ANTI_MERIDIAN or POST_MERIDIAN).


rtc.setHour(15,0); //for TIME_H24 mode rtc.setHour(3,POST_MERIDIAN); //for TIME_H12 mode


unsigned int hour * unsigned char meridian

Written by