Tool/software:
I can't get date and time information in portable_CC3235SF_LAUNCHXL_tirtos7_ticlang. I want to use the method in localtime code but I can't get it.
int timeZoneValue = 180; // GMT+3
ClockSync_setTimeZone(timeZoneValue);
struct tm netTime;
int32_t status;
// Fetch the current time
status = ClockSync_get(&netTime);
// Check if the time was retrieved successfully
if (status == 0 || status == CLOCKSYNC_ERROR_INTERVAL) {
Display_printf(display, 0, 0, “Local time = %s\n\r”, asctime(&netTime));
} else {
Display_printf(display, 0, 0, “Error getting time = %d\n\r”, status);
}
In this way I want to print time information to the serial port but I get “getting time=”-202” error.