User tests: Successful: Unsuccessful:
On a PATCH request the fields that are not sent are filled from the stored record, which holds dates in UTC. The SERVER_UTC and USER_UTC form filters then convert these values to UTC a second time, so every update moves them by the timezone offset. Keep the stored value for those fields.
Pull Request resolves #48518.
On a PATCH request, ApiController::save() fills the fields that are not sent with the values of the stored record. Stored dates are in UTC, but the SERVER_UTC / USER_UTC form filters then treat them as local time and convert them to UTC again. As a result every PATCH moves dates such as created, publish_up and publish_down of an article (or created_time of a category) by the timezone offset, even when they are not part of the request.
This PR keeps the stored value for those fields after validation. Dates that are sent in the request are filtered as before.
Europe/Amsterdam.PATCH /api/index.php/v1/content/articles/{id}
{"title": "New title"}
Every PATCH moves the Created, Start Publishing and Finish Publishing dates by the timezone offset (1 hour in winter, 2 hours in summer for Europe/Amsterdam), even though they were not sent.
Dates that are not sent in the PATCH request are not changed. Dates that are sent are still converted from the user's time zone to UTC, as before.
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
| Title |
|
||||||
I have tested this item ✅ successfully on 859eab6
Tested with JBT
api_call "PATCH" "/v1/content/articles/${id}" -d '{"title": "changed", "created" : "2026-01-01 12:00:00" }'publish_up API callpublish_down API callI have tested this item ✅ successfully on 859eab6
Tested with JBT
api_call "PATCH" "/v1/content/articles/${id}" -d '{"title": "changed", "created" : "2026-01-01 12:00:00" }'publish_up API callpublish_down API call| Labels |
Added:
PR-5.4-dev
|
||
I have tested this item ✅ successfully on 9a2231e
I have tested this item ✅ successfully on 9a2231e
| Status | Pending | ⇒ | Ready to Commit |
RTC
RTC
| Labels |
Added:
RTC
bug
Webservices
|
||
| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-10-02 17:05:45 |
| Closed_By | ⇒ | richard67 |
Thanks @TLWebdesign for this PR, and @muhme and @alikon for testing.
I have tested this item ✅ successfully on 859eab6
Tested with JBT
api_call "PATCH" "/v1/content/articles/${id}" -d '{"title": "changed", "created" : "2026-01-01 12:00:00" }'publish_upAPI callpublish_downAPI callThis comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48519.