How to update Timestamp using the time.h library in NRF52840

Hello guys,

I'm stuck trying to produce a timestamp for data synchronization in my project. I have gone through some of the issues raised in this regard but none was actually helpful. 

Currently I am using the time.h library, but the time doesn't get updated. it keeps printing the same time.

Now I tried using a static incrementing counter to update the ".tm_secs" struct member, Now the time updates over as the counter increment. but the minute and hour field soesn't get updated when ".tm_secs" gets to 59.

I don't know if this is the best approach, but I just want to produce a time epoch, I can always set the epoch with the current time over my GSM modem.

Related