You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hopefully this is the proper place to post this -- if not please let me know:
strptime() does not seem to parse AM/PM correctly (using the %p token). You will see in the demo code that it fails to detect AM and always makes the time PM. On my desktop, that demo code will print "hour is 8" but on the ESP32 it will print "hour is 20".
My understanding is that the parsing of %p depends on the locale, which may not use AM/PM, but I don't see a way to configure things in a way that makes %p work.
Edit to add: %p does change how the parsing works, however. Parsing "8:00AM" or "8:00PM" comes back as 20:00 with %p present, or always 08:00 without %p.
Hello @chconnor, I can confirm the issue and I have reported it to the related team to take a look at this as it cannot be fixed in Arduino project. Tested also with ESP-IDF with same results. When I know any news I will post an update here.
Board
ESP32
Device Description
ESP32-DevKitC-VIE
Hardware Configuration
many things
Version
v2.0.11
IDE Name
vscode + Platform IO
Operating System
Linux
Flash frequency
default?
PSRAM enabled
yes
Upload speed
default?
Description
Hopefully this is the proper place to post this -- if not please let me know:
strptime() does not seem to parse AM/PM correctly (using the %p token). You will see in the demo code that it fails to detect AM and always makes the time PM. On my desktop, that demo code will print "hour is 8" but on the ESP32 it will print "hour is 20".
My understanding is that the parsing of %p depends on the locale, which may not use AM/PM, but I don't see a way to configure things in a way that makes %p work.
Edit to add: %p does change how the parsing works, however. Parsing "8:00AM" or "8:00PM" comes back as 20:00 with %p present, or always 08:00 without %p.
Sketch
Debug Message
Other Steps to Reproduce
See also this user report: https://esp32.com/viewtopic.php?t=36652
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: