Curbside - Appointments being pushed to next day
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
3.6 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
EG 3.3 - with curbside module code installed.
Hello, this may just be a local issue since we applied the curbside changes to our 3.3 system.
We just went back to later hours in one of our branches today, from a 6pm close to a 9pm close.
I received a report at 6:51pm that staff could no longer schedule appointments for the current day. They would enter 3/1/2021 7:30pm as the appointment time, and after pressing save they would receive back an appointment for 3/2/2021 7:30pm.
My suspicion is that it is timezone/UTC time related. We are on CST which is -6 UTC, so after 6pm, the UTC date is the next day. (I'm horrible with time related math, so this all could be way off.) It seems like the date and time slot are sent to the back end separately. So I'm wondering if a UTC date is getting sent by accident?
When I set a breakpoint at the updateAppointment function, I see the following info for the appointment.
slot: "2021-03-
slot_date: Tue Mar 02 2021 20:55:38 GMT-0600 (Central Standard Time) {}
slot_time: "09:00:00"
I suspect that this line is moving the date to the next day.
(new Date(appt.
When I run a little mock up of the toISOString at https:/
Josh
Changed in evergreen: | |
assignee: | nobody → Terran McCanna (tmccanna) |
Changed in evergreen: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in evergreen: | |
assignee: | Terran McCanna (tmccanna) → nobody |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
When I test this morning I cannot trigger the issue.
And the Mozilla docs for toISOString seem to confirm that the date is converted to UTC when that function is used. https:/ /developer. mozilla. org/en- US/docs/ Web/JavaScript/ Reference/ Global_ Objects/ Date/toISOStrin g
I'm testing in Chrome 88.0.4324.182