Europe/Amsterdam.PATCH /api/index.php/v1/content/articles/{id}
{"title": "New title"}
5.4
Dates that are not part of the PATCH request stay unchanged.
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). After a few updates the dates can end up on the previous day. The same happens to created_time when patching a category.
Example with Europe/Amsterdam, stored values in the database:
| created | publish_up | publish_down | |
|---|---|---|---|
| Stored | 2023-01-01 20:00:00 | 2023-01-01 20:00:00 | 2023-06-01 20:00:00 |
| After PATCH 1 | 2023-01-01 19:00:00 | 2023-01-01 19:00:00 | 2023-06-01 18:00:00 |
| After PATCH 2 | 2023-01-01 18:00:00 | 2023-01-01 18:00:00 | 2023-06-01 16:00:00 |
Reproduced on a clean 5.4-dev install and on a live Joomla 6.1.0 site. The same code is in 6.1-dev and 6.2-dev.
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 treat them as local time and convert them to UTC again.
| Labels |
Added:
No Code Attached Yet
bug
|
||
| Title |
|
||||||
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-10-02 17:13:56 |
| Closed_By | ⇒ | TLWebdesign |