From 5a7c328475d238be9867c5c3b330cc4308bcba8a Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 1 Jul 2026 13:01:34 +0100 Subject: [PATCH] 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 --- koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js index 36a37e151e..cd8bde765c 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js +++ b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js @@ -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" );