No Code Attached Yet bug
avatar TLWebdesign
TLWebdesign
28 Sep 2026

What happened?

  1. Set the Website Time Zone in the Global Configuration (or the time zone of the API user) to a zone other than UTC, for example Europe/Amsterdam.
  2. Create an article and note its Created and Start Publishing dates.
  3. Update only the title with the API:
    PATCH /api/index.php/v1/content/articles/{id}
    {"title": "New title"}
    
  4. Check the Created and Start Publishing dates again. Repeat step 3 a few times.

Version

5.4

Expected result

Dates that are not part of the PATCH request stay unchanged.

Actual result

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

System Information

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.

Additional Comments

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.

avatar TLWebdesign TLWebdesign - open - 28 Sep 2026
avatar joomla-cms-bot joomla-cms-bot - change - 28 Sep 2026
Labels Added: No Code Attached Yet bug
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 Sep 2026
avatar TLWebdesign TLWebdesign - change - 28 Sep 2026
Title
…
[5.4] API converts dates wrong when omitted
[5.4] API PATCH shifts dates by the timezone offset
avatar TLWebdesign TLWebdesign - edited - 28 Sep 2026
avatar TLWebdesign TLWebdesign - change - 28 Sep 2026
The description was changed
avatar TLWebdesign TLWebdesign - edited - 28 Sep 2026
avatar TLWebdesign TLWebdesign - change - 2 Oct 2026
Status New ⇒ Closed
Closed_Date 0000-00-00 00:00:00 ⇒ 2026-10-02 17:13:56
Closed_By ⇒ TLWebdesign
avatar TLWebdesign TLWebdesign - close - 2 Oct 2026

Add a Comment

Login with GitHub to post a comment