API - Piwigo uses local time for timestamps, need timezone information #434

Open
opened 2026-10-04 23:58:15 +02:00 by adam · 2 comments
Owner

Piwigo uses server's local time to populate date/time fields on API responses.
When the API client is in a different timezone it is impossible to tell how these values should be adjusted in order to display time values accurately (or perform a 2-way synchronization of metadata)

I believe web applications should display date/time values in the W3C format (ISO 8601), which includes the timezone shift from GMT. This way any client application can correctly translate these values into the local time zone.

Piwigo uses server's local time to populate date/time fields on API responses. When the API client is in a different timezone it is impossible to tell how these values should be adjusted in order to display time values accurately (or perform a 2-way synchronization of metadata) I believe web applications should display date/time values in the W3C format (ISO 8601), which includes the timezone shift from GMT. This way any client application can correctly translate these values into the local time zone. <!-- github-sync-id:145888488 -->
Author
Owner

We certainly have to improve that, but pwg.session.getStatus already gives you the current_datetime. See http://piwigo.org/bugs/view.php?id=2243 and it was on your request if I remember correctly :-)

We certainly have to improve that, but pwg.session.getStatus already gives you the current_datetime. See http://piwigo.org/bugs/view.php?id=2243 and it was on your request if I remember correctly :-) <!-- github-comment-id:219010808 -->
Author
Owner

Your are right! I forgot about that. I can certainly detect the time difference between the client and the server that way.
There is still one more issue which stops me from implementing a metadata sync feature:
https://github.com/Piwigo/Piwigo/issues/452
Thank you,

Your are right! I forgot about that. I can certainly detect the time difference between the client and the server that way. There is still one more issue which stops me from implementing a metadata sync feature: https://github.com/Piwigo/Piwigo/issues/452 Thank you, <!-- github-comment-id:219065349 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#434