[Bug 43696] New: ISO 18626 date-times are not UTC
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43696 Bug ID: 43696 Summary: ISO 18626 date-times are not UTC Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: ILL Assignee: koha-bugs@lists.koha-community.org Reporter: pedro.amorim@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: lisette@bywatersolutions.com, pedro.amorim@openfifth.co.uk, tomascohen@gmail.com Target Milestone: --- -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43696 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43696 --- Comment #1 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 207110 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207110&action=edit Bug 43696: Send ISO 18626 date-times as UTC ISO 18626 date-times must be UTC in the form YYYY-MM-DDTHH:MM:SSZ. supplyingAgencyMessage sent local times as YYYY-MM-DD HH:MM:SS, and dueDate, lastChange, dateSent, retryBefore and retryAfter unformatted, so partners failed to parse the message. Date-only retryBefore and retryAfter, as sent by the staff interface, also failed Koha's own schema validation, so 'Ask for retry' with a retry date did not change the request status. All supplyingAgencyMessage date-times are now converted to UTC and formatted as YYYY-MM-DDTHH:MM:SSZ. Test plan: 1) Enable the ILLModule system preference 2) Open a supplying ILL in 'Request received' status 3) Click 'Ask for retry', pick a 'Retry after' date, choose a 'Reason for retry' and confirm 4) Note the status does not change 5) Apply patch and restart_all 6) Repeat 3) 7) Note the status is now 'Retry possible', and the new supplyingAgencyMessage shows its date-times as YYYY-MM-DDTHH:MM:SSZ 8) prove t/db_dependent/Koha/ILL/ISO18626/Request.t Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43696 --- Comment #2 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 207111 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207111&action=edit Bug 43696: (follow-up) Use a single ISO 18626 date-time formatter Koha::ILL::ISO18626::_now_utc_str and Koha::ILL::ISO18626::Request::_format_iso_payload_date_param now produce the same ISO 18626 UTC date-time, so they are merged into Koha::ILL::ISO18626::format_date_time. No behaviour change. Test plan: 1) prove t/db_dependent/Koha/ILL/ISO18626.t t/db_dependent/api/v1/iso18626/request.t t/db_dependent/Koha/ILL/ISO18626/Request.t Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43696 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |pedro.amorim@openfifth.co.u |ity.org |k CC| |minhpq@tinhvan.com Depends on| |43694 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43694 [Bug 43694] Koha::REST::V1::to_xml emits child elements in random order, producing schema-invalid XML -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43696 --- Comment #3 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- *** Bug 43701 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43696 Phan Quang Minh <minhpq@tinhvan.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #207110|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43696 Phan Quang Minh <minhpq@tinhvan.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #207111|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43696 --- Comment #4 from Phan Quang Minh <minhpq@tinhvan.com> --- Created attachment 207398 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207398&action=edit Bug 43696: Send ISO 18626 date-times as UTC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43696 --- Comment #5 from Phan Quang Minh <minhpq@tinhvan.com> --- Created attachment 207399 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207399&action=edit Bug 43696: (follow-up) Use a single ISO 18626 date-time formatter -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43696 Phan Quang Minh <minhpq@tinhvan.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #6 from Phan Quang Minh <minhpq@tinhvan.com> --- Signed off. Both patches applied cleanly on top of the bug 43674 and 43694 patches, on a Koha 26.05.02 package install, and retested against our third-party implementation. What I checked - Koha -> us: the supplyingAgencyMessage header now carries <timestamp>2026-10-05T10:16:59Z</timestamp>, a valid xs:dateTime in UTC. Three status messages sent, all accepted. - Our compatibility shim logs every correction it has to make to an incoming Koha message. The entry for fixing timestamp format has gone. What is left is only the hardcoded agency identifier (bug 43695). So of the four workarounds we started with, three are now covered by patches. What I did not check - Steps 2-7 of your test plan, the 'Ask for retry' flow through the staff interface. I tested the message formatting from the outside rather than driving that screen. - Step 8, prove t/db_dependent/Koha/ILL/ISO18626/Request.t. This is a package install with no t/ directory or test harness. Same caveat as on 43674 and 43694. One thing to know when reading my test output statusInfo.lastChange came out as 17:16:54Z when UTC was 10:16. That is not the patch. This instance has no timezone configured for Koha (<timezone> empty in koha-conf.xml, no MariaDB timezone tables), so dt_from_string treats the bare database string as UTC. Feeding the same string "2026-10-05 17:16:54" to dt_from_string: default timezone on this box -> 2026-10-05T17:16:54Z Asia/Ho_Chi_Minh -> 2026-10-05T10:16:54Z (correct) so format_date_time converts correctly whenever Koha knows its timezone. I mention it only so nobody reads that number as a regression. On bug 43701: you are right that it duplicates this one. I opened it without having seen 43696. Nothing further needed from my side there. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43696 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |lisette@bywatersolutions.co |y.org |m -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org