Bug 42868: (follow-up) Fix stale comment referencing removed UTC boundary logic
The comment above the day-boundary calculation still described the previous dayjs.utc() approach, which was replaced by dayjs.tz() in the parent commit. Update it to describe the current behaviour so it doesn't mislead future maintainers into re-introducing the timezone shift bug this patch fixed. Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
084660a6df
commit
5a7c328475
|
|
@ -959,9 +959,10 @@ $("#placeBookingModal").on("show.bs.modal", function (e) {
|
|||
// Range set, update hidden fields and set available items
|
||||
else if (selectedDates[0] && selectedDates[1]) {
|
||||
// set form fields from picker
|
||||
// Extract local date and send as explicit UTC day boundaries
|
||||
// This preserves the user's selected DATE regardless of browser timezone
|
||||
// Using dayjs.utc() ensures startOf/endOf operate in UTC, not browser TZ
|
||||
// Send day boundaries anchored to the library's configured
|
||||
// timezone ($timezone()), not UTC or the browser's local timezone.
|
||||
// This preserves the user's selected DATE through the server's
|
||||
// round-trip conversion back to library time (see Bug 42868).
|
||||
let startDate = dayjs(selectedDates[0]).format(
|
||||
"YYYY-MM-DD"
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue