How to store and use the date and time #140
-
Hi !! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
The current date time returned from the RTC is a RtcDateTime object. The easiest way to store this is to call Epoch time is a standard, the RtcDateTime object supports both 32 bit and 64 bit versions. |
Beta Was this translation helpful? Give feedback.
The current date time returned from the RTC is a RtcDateTime object.
The easiest way to store this is to call
Epoch32Time()
which returns a 32bit value that you can store.Then you retrieve that stored value and pass to
InitWithEpoch32Time(uint32_t time)
to create an RtcDateTime object again.Epoch time is a standard, the RtcDateTime object supports both 32 bit and 64 bit versions.