Search found 1 match

by dbaicz
Mon Nov 06, 2023 11:09 am
Forum: General Discussion
Topic: strptime - what am I doing wrong?
Replies: 4
Views: 2327

strptime - what am I doing wrong?

Hi, On ESP32 I need to convert a date and time in the form "10/23/2023 11:37:15 AM" to a 24 hour format in the form "23/10/2023 11:37:15". I use strptime function, but it completely ignores the AM/PM flag and returns the time as if the source time contained PM. Example: #include <time.h> struct tm t...