-
-
Notifications
You must be signed in to change notification settings - Fork 127
RtcDateTime object
(under construction)
RtcDateTime represents the time and date in one object. It is used to retrieve and set the time on the Rtc objects.
Construct the RtcDateTime from seconds.
secondsFrom2000 - the number of seconds since Jan 1, 2000. This is not UNIX nor NTP date time.
RtcDateTime(uint16_t year, uint8_t month, uint8_t dayOfMonth, uint8_t hour, uint8_t minute, uint8_t second)
Construct the RtcDateTime from individual values of the date and time.
Construct the RtcDateTime from the compilation format of date and time
RtcDateTime compileDateTime(__DATE__, __TIME__);
Basic validity test of values. It does not check time zones or daylight savings time.
<return>, true if values represent a valid date and time
<return>, the four digit year, like 2023.
<return>, the month
<return>, the day
<return>, the hour, in 24 hours format
<return>, the minutes
<return>, the seconds
<return>, the day of the week, where the day of the week starts on Sunday with a value of 0. You can assign it to an enum DayOfWeek.
This allows for seconds to added to the time.
time += 60; // add a minute
<return>, the total seconds since 1/1/2000. This is not UNIX time.
<return>, the total seconds since 1/1/2000. This is not UNIX time.
<return>, a Unix time value.
time - a time value in 32 bit Unix time space.
<return>, a Unix time value.
time - a time value in 64 bit Unix time space.
<return>, a NTP time value.
time - a time value in 32 bit NTP time space.
<return>, a NTP time value.
time - a time value in 64 bit NTP time space.