Failed to obtain timestamp in 12-hour format

When the iPhone is set to 12-hour time format, obtaining a timestamp similar to "2025-07-18 16:29:00" fails

Can you provide more information about the APIs you're using. Maybe a code listing showing what's failing?

The vast majority of problems like this are caused by folks parsing fixed-format dates DateFormatter and failing to set the locale to en_US_POSIX. For a detailed explanation, see Working With Fixed Format Date Representations.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Failed to obtain timestamp in 12-hour format
 
 
Q