Hello,
I've got an issue with the clock_gettime function.
When I set the RTC time to a known hour (00h11h00s in my case), I don't read the same value immediatly after, I get 00h10m59s.
Does someone has already encounter this issue? Is there a better way to update the RTC value, avoiding this drift (in the past)?
To set the RTC value:
I'm using timeutil_timegm64() to convert POSIX date time into a timestamp and clock_settime with the CLOCK_REALTIME to set my new value.
To get the RTC value:
I'm using clock_gettime with the CLOCK_REALTIME to get the timestamp.
Then I convert it into POSIX date time with gmtime_r().
I'm using a nFR52833 devkit, with Zephyr toolchain nRF Connect SDK V1.9.1