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

Fix date format to save PM time #3046

Merged

Conversation

fsidobre
Copy link
Contributor

Hello!
The recent changes to the format handled by date & datetime fields introduced a few bugs :

Having the h format instead of H for hour will :

  • make default hour stored for date fields as 12:00
  • make default hour for query comparison as 12:00 (e.g. when using where { date: '>yesterday' })
  • only store the hour in a range between 0 and 12 on a datetime field when you type a PM hour (with or without the AM/PM selector)

Fixes #3024

Copy link
Contributor

@Joossensei Joossensei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! And nice that you wrote some tests for these as well!

Copy link
Member

@bobdenotter bobdenotter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @fsidobre 👍

The failures in the CI are fixed in #3053

@bobdenotter bobdenotter merged commit 84336d0 into bolt:master Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bolt 5.1 All datetime fields are saved as AM
3 participants