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.

CommentFileSizeAuthor
#2 field-date-config.png18.67 KBsgdev

Comments

ron_s created an issue. See original summary.

sgdev’s picture

StatusFileSize
new18.67 KB

Just 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.

Date field config

sgdev’s picture

sgdev’s picture

Version: 7.x-2.11 » 7.x-2.x-dev
artis’s picture

We 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?

sgdev’s picture

@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.

steinmb’s picture

If 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.

sgdev’s picture

Issue summary: View changes
sgdev’s picture

@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.

damienmckenna’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev

Due to the amount of changes needed for the all-day fix, 7.x-2.12 has been changed to 7.x-3.0.

damienmckenna’s picture

Moving this to 7.x-3.0-beta2 so that we can get the core restructuring into beta1.

damienmckenna’s picture

Can 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.

damienmckenna’s picture

Version: 7.x-3.x-dev » 7.x-2.x-dev
damienmckenna’s picture

damienmckenna’s picture

Title: Timepicker conflicts with end date settings in 7.x-2.11 » Timepicker conflicts with end date settings
Version: 7.x-2.x-dev » 7.x-3.x-dev

Moving this to 7.x-3.x because it affects the all-day functionality.