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

Time part does not save date #366

Open
louis-vs opened this issue Jun 17, 2021 · 0 comments
Open

Time part does not save date #366

louis-vs opened this issue Jun 17, 2021 · 0 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@louis-vs
Copy link
Collaborator

Describe the bug
The time part does not save the provided date into the database, only the time with the date 2000-01-01.

To Reproduce

  1. Edit a time part on a page
  2. Set its contents to (e.g.) 2020-05-01T09:00
  3. Save the page
  4. The time part now shows 2000-01-01T09:00, which is the time stored in the database.

Expected behaviour
The time should save as (e.g.) 2020-05-01T09:00 - the date should be preserved.
Alternatively, and I think this would be better, the Time part should be reserved for times only, perhaps adding a third DateTime part for this purpose.

Devices:

  • OS: Windows, GNU/Linux, Android
  • Browser firefox, chrome
  • Version latest

Additional context
I've tried some fixes, like changing the attr_json type to :datetime, but this didn't fix the issue. The problem seems to occur at the point where the part is being saved, since the server is receiving the correct data.

@louis-vs louis-vs added bug Something isn't working help wanted Extra attention is needed labels Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants