Tool/software:
SDK : 7_10_00_13
TiTROS7 and TICLANG
CCS: 12.4
At UTC time Tuesday, July 23, 2024 7:36:50 AM, i got the timestamp from sntp is 16882266649961150206.
I converted it to ntp time by dividing 32 and got 3930709010. And covert it to UNIX time to 1721720210. However, when I use ctime to print the time/date. There is 6 hours less.
SNTP time stamp: 16882266649961150206.
NTP Time : 3930709010
UNIX Time: 1721720210
The ctime printout is
SNTP: currentTimeNtp time: Fri Jul 23 01:36:50 2094
SNTP: currentTimeUnix time: Tue Jul 23 01:36:50 2024
The same can get correct date and time in older SDK by passing the ntp value to ctime() .
e2e.ti.com/.../cc3220sf-launchxl-cc3220sf-sntp-server
Do I miss anything to set?
And the second question, shall I use ntp time or UNIX to set the network processor?
sl_DeviceSet(SL_DEVICE_GENERAL, SL_DEVICE_GENERAL_DATE_TIME,
sizeof(SlDateTime_t), (unsigned char *)(&dt));