Koha-clms/t/db_dependent/api
Martin Renvoize 7eb80270e8
Bug 42868: (follow-up) Add regression test for non-UTC library timezone
The bug this fixed only manifests when the library's configured
timezone (C4::Context->tz) is not UTC: Koha::Object::_recursive_fixup
converts an incoming RFC3339 instant to that timezone before storing
it in the timezone-naive 'bookings.start_date'/'end_date' columns, so
a UTC-anchored boundary shifts by the timezone offset on write.

None of the existing Cypress specs catch this, because they never run
with the browser/test-runner timezone diverging from the configured
library timezone - both always come from the same container clock.

Add a Perl-level API test that mocks C4::Context->tz to a non-UTC zone
(America/New_York) and asserts the boundaries sent by place_booking.js
round-trip to the correct library-local date, pinning this regression
independently of any particular environment's timezone.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-08-10 15:52:50 -06:00
..
v1 Bug 42868: (follow-up) Add regression test for non-UTC library timezone 2026-08-10 15:52:50 -06:00