Setup RTC time using unix timestamp | Cypress Semiconductor
Setup RTC time using unix timestamp
I'm attempting to set the current time of my
RTC by sending a Unix timestamp from a smartphone to the device. I am successfully able to get the timestamp from my smartphone to the ble device.
If I try to just hardcode something to test like this:
uint64_t out = 1475591308;
RTC clock goes to
1/11/2372 ?? Am I not implementing this right? The method signature in the
And the docs say:
Sets the time in the Unix/Epoch time format - the number of seconds elapsed from January 1, 1970 UTC 00:00 hrs.
Update: I've changed nothing and now when setting the unix time it freezes....story of my life.
I'm trying to call
RTC_SetUnixTime in my
BleCallBack method if that helps at all.