This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Datetime/RTC example

Hi,

Are there any examples utilizing the nRF9160 RTC? I want to timestamp my data that I send to the cloud because my use-case involves queuing up data for extended periods of time (a few hours) and then sending it all at once. It would be nice if I could timestamp the data with actual timestamps instead of just milliseconds since boot. What are my options for this?

Thanks

Parents Reply
  • My question relates more to the actual getting of the current time. I can read the RTC off of the modem using "AT+CCLK?" but this time is not accurate until I set it with "AT+CCLK=___". For example, right now when I read the time with AT+CCLK, it is 5 hours ahead. What are my options for getting the current time so I can set it in the modem and use it throughout? Of these, what would be the most reliable?

    I'm thinking that on boot, I would want to request the current time and then save it in the modem. What is the most reliable way of doing this?

Children
Related