https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37831 Bug ID: 37831 Summary: Timezone ignored when passing rfc3339 formatted date Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org CC: tomascohen@gmail.com When requesting the REST API we are getting datetimes in the RFC3339 format, for instance: 2024-09-04T06:03:34-03:00 This is retrieving the value that is stored DB, and using the timezone defined in the $KOHA_CONF file. However this format is not correctly into account when we search or, more importantly, when we create/update objects. Examples (Using the Buenos Aires timezome, which is UTC-3 "America/Argentina/Buenos_Aires"): 1. POST /api/v1/patrons with "due_date": "2024-09-09T23:59:00-00:00", And you will get "due_date": "2024-09-09T23:59:00-03:00", in DB: date_due: 2024-09-09 23:59:00 2. GET /api/v1/jobs?q={"enqueued_on":{">":"2024-09-04T09:26:52-03:00"}} is generating the following query SELECT `me`.`id`, `me`.`status`, `me`.`progress`, `me`.`size`, `me`.`borrowernumber`, `me`.`type`, `me`.`queue`, `me`.`data`, `me`.`context`, `me`.`enqueued_on`, `me`.`started_on`, `me`.`ended_on` FROM `background_jobs` `me` WHERE `enqueued_on` > '2024-09-04T09:26:52-03:00' But when you run it manually, you get a warning: | Warning | 1292 | Truncated incorrect datetime value: '2024-09-04T09:26:52-03:00' | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.