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

Return Invalid DateTime for using meridiem with 24-hour (#1549) #1562

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Matthematic
Copy link

This is a fix for the case where the input '11-08-2023 15:00 AM' is parsed and interpreted as '11-08-2023 03:00 PM'. Instead of this, it should be a Datetime.Invalid with a "unit out of range" reason similar to what happens with '11-08-2023 25:00'.

fixes #1549

Copy link

linux-foundation-easycla bot commented Jan 6, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: Matthematic / name: Matthematic (7152ca4)

@icambron
Copy link
Member

icambron commented Aug 3, 2024

Sorry for the long delay in reviewing this.

While I agree this is a bug, it's a minor one, and the fix is unfortunate, because it's extra work on the hot path. I think if you can use the benchmarks not mearningfully shower that token parsing is no slower now, we can merge this.

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

Successfully merging this pull request may close these issues.

DateTime is not invalid like it should be when using hour 15 with 12-hour time token.
2 participants