When I go to launchpad webpage and set time, it shows a good local time, but my SNTP code
//... if (clock_settime(CLOCK_REALTIME, &ts) != 0) { Display_printf(display, 0, 0, "startSNTP: Failed to set current time\n"); iret=0; } else{ iret=1; int isz=sizeof(tp); int ires=clock_gettime(CLOCK_REALTIME,&tp); strftime(&(acdt[0]), 0x30, "%D %T", gmtime(&tp.tv_sec)); Display_printf(display, 0, 0, "Time=%s\n",&acdt[0] ); strftime(&(acdt[0]), 0x30, "%D %T", localtime(&tp.tv_sec)); Display_printf(display, 0, 0, "Local Time=%s\n",&acdt[0] ); } //...
I get results as if DST not properly configured:
retVal=0 Time=10/11/23 15:42:22 Local Time=10/11/23 09:42:22
which would be wrong for CDT
How do I configure properly the DST in local time?