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: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
e0b81c9788
commit
a7546bbcbe
|
|
@ -959,9 +959,10 @@ $("#placeBookingModal").on("show.bs.modal", function (e) {
|
||||||
// Range set, update hidden fields and set available items
|
// Range set, update hidden fields and set available items
|
||||||
else if (selectedDates[0] && selectedDates[1]) {
|
else if (selectedDates[0] && selectedDates[1]) {
|
||||||
// set form fields from picker
|
// set form fields from picker
|
||||||
// Extract local date and send as explicit UTC day boundaries
|
// Send day boundaries anchored to the library's configured
|
||||||
// This preserves the user's selected DATE regardless of browser timezone
|
// timezone ($timezone()), not UTC or the browser's local timezone.
|
||||||
// Using dayjs.utc() ensures startOf/endOf operate in UTC, not browser TZ
|
// 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(
|
let startDate = dayjs(selectedDates[0]).format(
|
||||||
"YYYY-MM-DD"
|
"YYYY-MM-DD"
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue