Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canadian locale doesn't support AM/PM? #102

Open
ronnyli opened this issue Aug 31, 2023 · 1 comment
Open

Canadian locale doesn't support AM/PM? #102

ronnyli opened this issue Aug 31, 2023 · 1 comment

Comments

@ronnyli
Copy link

ronnyli commented Aug 31, 2023

(local-date-time "M/d/yyyy h:mm:ss a" "1/3/2022 3:58:29 PM")

Execution error (DateTimeParseException) at java.time.format.DateTimeFormatter/parseResolved0 (DateTimeFormatter.java:2051).
Text '1/3/2022 3:58:29 PM' could not be parsed at index 17

Some sleuthing in the Clojurians slack discovered that it has to do with the Canadian locale (link)

@frenchy64
Copy link
Collaborator

Can you post your solution? I'm guessing you followed this advice?

henryw374: Set the locale on the formatter itself rather than relying on ambient default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants