Incorrect display duration of appointments in the scheduler
Detailed description of the problem
As I already wrote in ticket #4978, it's all about time-limited appointments. In my example, I have selected an appointment of 105 minutes, i.e. an appointment from 11:15-13:00.
When I want to enter the appointment in the weekly view, in the period from 11:15-13:00, the error message appears that the limit is restricted to 105 minutes. The problem is that the time period from 11:15-13:00 is 105 minutes. So either there is an error in the calculation of times, or I can no longer calculate 120-15 minutes.
I then raised the time limit to 2 hours, i.e. 120 minutes. I then tried to put the entry in the scheduler again, but for the period 11:15-13:00.
The problem with this is that I have to start from 11.30h in the calendar and mark the block until 13h, then change the date manually to 11.15h, that the error message comes up that only 120 minutes are possible (which is significantly less at 105 min) or else it always changes the period to 12:15-13:00h, although I enter 11:15. It is also shown as 12:15h in the display.
Expected Behavior
That either no error message appears if the time is not exceeded, but is kept exactly and/or that if you enter 11:15h as the start time, this is also accepted and not made into 12:15h until the end time of 13h.
Steps to reproduce the behavior
For the first error message:
- Create a resource with a limited time window of 105min.
- Create an appointment in the weekly view, e.g. on 01.07.2024, in which you mark/select the range from 11:30h - 13:00h.
- Then manually change the start time from 11:30h to 11:15h
- An error message appears stating that the appointment is time-limited.
For the incorrect display in the schedule:
- Create a resource with a limited time window of 120min.
- Create an appointment in the weekly view, e.g. on 01.07.2024, in which you mark/select the range from 11:30h - 13:00h.
- Then manually change the start time from 11:30h to 11:15h
- In the scheduler, the time changes to 12:15h.
- Subsequent changes will not improve the situation.
What eLabFTW version are you using? Visible in bottom right of a page.
5.0.3
Do you have any idea what may have caused this?
No idea
Do you have an idea how to solve the issue?
No idea
Additional information
No response
Hello,
Thank you for reporting this issue. We'll look into it.
Regarding the magically changing time (11:15 vs 12:15): I can somewhat reproduce it and it seems to be related to the time difference UTC vs. the timezone of the user who does the change. For me, this is -8:00, PST vs. UTC. I tested against demo.elabftw.net.
@relaxony, what is your timezone? Was it 1 hour different from UTC during your tests?
@MarcelBolten Europe/Berlin also the same as Paris. It should be UTC+1
I've looked into it a bit. The datetime from the modal window are sent with epoch, which is UTC. So there is a discrepency between the stored "other" date (start or end) and the one we generate.
I tried setting everything to UTC, without luck. So basically this issue is a healthy mix of timezone issues and date representation issues.
Workaround is to grab the entry by the ends to change the time, because that works. The datetime inputs in the modal need some work. This whole thing is a mess. Between the javascript date with the browser that could be in a different timezone than the server, which can be in a different timezone than the sql server (or have different settings), things get complicated pretty quick :/
Is there any update on a fix for this? I am experiencing the same issue and it essentially renders the scheduling feature un-usable.
Thanks!
@ddlidded isn't the workaround working?
Workaround is to grab the entry by the ends to change the time, because that works.