I'm trying to determine how to get a Linux timestamp for a project using nRF9160. It looks like the mktime() function is not supported. Any suggestions?
thanks!
I'm trying to determine how to get a Linux timestamp for a project using nRF9160. It looks like the mktime() function is not supported. Any suggestions?
thanks!
Hi,
One way to obtain the unix/linux timestamp is to use the date_time library, similar to what is done in this devzone ticket.
There might be some changes regarding the implementation since the ticket is a year old, so I recommend you consult The Date-Time documentation for the SDK you intend to use and cross-validate that with the example supplied. The Date-Time documentation also lists some NCS samples for the nRF9160 that uses the library if you need further inspiration for how to use the library.
I hope this helps!
Kind regards,
Andreas
Thanks! that helps.