Problem/Motivation
We're using the jQuery UI Timepicker (https://fgelinas.com/code/timepicker/) to set time on date fields, and the change in 7.x-2.11 to set end dates to 23:59:59 (for example) is going to be a significant issue. We use the timepicker because users want fast data entry, and they never need more granular time settings than :00, :15, :30 and :45.
After running the 7.x-2.11 database updates, we saw end dates were shifted one day ahead and 14 minutes, 1 second back. So an end date of "2020-01-01 06:00:00" became "2020-01-02 05:45:59". I'm not sure how this issue can be rectified, because those using a timepicker are very, very rarely going to enter seconds other than :00. This means there would need to be some type of convoluted conversion to extract "2020-01-01 05:59:59" from the database and display it as "2020-01-01 06:00:00" so the timepicker works correctly.
I'm sure you've been researching this a long time and have a better grasp on how to approach the larger problem of date storage. At a high level it seems to make more sense to store data as major times as it has been (06:00:00 instead of 05:59:59), and handle the differences in the front-end display. Users won't be intuitively entering and/or editing dates of 1 second differentials.
I am certainly open to discussing further and sharting ideas, or if another path needs to be taken, this issue can be closed. Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | field-date-config.png | 18.67 KB | sgdev |
Comments
Comment #2
sgdev commentedJust adding another comment as reference... looking at our date field format, we don't even capture or store seconds, and it's not an option on the front end. As I mentioned, it's a level of detail we don't need, and the module allows for this type of configuration.
See below.
Comment #3
sgdev commentedComment #4
sgdev commentedComment #5
artis commentedWe also experienced some dates moved 1 day forward and 5 minutes back. Saving the node with no changes, then reverting to the previous revision, put everything back was super annoying to do. Any idea what happened?
Comment #6
sgdev commented@artis, yes it's very clear what happened. There are several threads discussing 7.x-2.11 and the work that needs to be done to fix it for 7.x-2.12. See the related issues. We rolled back to 7.x-2.10 until all of it is fixed.
Comment #7
steinmb commentedIf you can, head over to #2818125: datePopup.settings.startTime value causes an order/format issue with wvega timepicker and help out testing the state of using a alternative widget like https://github.com/wvega/timepickerthat that provide higher minute precision.
Comment #8
sgdev commentedComment #9
sgdev commented@steinmb, sorry for the confusion. We actually use the jQuery UI Timepicker: https://fgelinas.com/code/timepicker/
We had previously tested with wvega and found it did not meet our needs.
Comment #10
damienmckennaDue to the amount of changes needed for the all-day fix, 7.x-2.12 has been changed to 7.x-3.0.
Comment #11
damienmckennaMoving this to 7.x-3.0-beta2 so that we can get the core restructuring into beta1.
Comment #12
damienmckennaCan you please test the current 7.x-2.x dev snapshot, let us know if it solves the problems or if they still exist. Thank you.
Comment #13
damienmckennaComment #14
damienmckennaComment #15
damienmckennaMoving this to 7.x-3.x because it affects the all-day functionality.