jmalcic / spina-admin-conferences

Conference management plugin for Spina.
MIT License
1 stars 1 forks source link

Time part does not save date #366

Open louis-vs opened 3 years ago

louis-vs commented 3 years ago

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:

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.