Zipped reports files and timezone

As indicated in Set zipped file mode and compression for reports (#12557) · Issues · Tryton / Tryton · GitLab, there are currently some file mode difficulties with zipped report files.

When making reports via the client, it is a bit surprising when the date/time is different between zipped reports and direct.

Namely, in direct report files, when saved by the user the report file will have a date time in the local timezone. But zipped reports will all be in the server timezone, or UTC.

This is rather confusing to the users. For example, if a number of invoices are posted, which are selected and the invoices are zipped… the dates are UTC which, for us at the moment is 2 hours prior!

So is this a case (such as in the report itself) where the client’s timezone should be available in the context in order to be able to set a local date time on these files?

I see no problem to have the Zip file info containing the modification date from the server because the file was created on the server.

Reading about the zip format. The modification time has not timezone defined. So it is usual that zip programs consider them as local time.
There is an “Extended Timestamp Extra Field” that exist to define the timestamp in UTC. Mercurial for example has implemented it with archival: add "extended-timestamp" extra block for zip archives (issue3600) (133d13e44544) · Commits · mercurial / mercurial-devel · GitLab
But I do not like to have to maintain such low level code for this. It will be better if Python supports it in zipfile module like go does: archive/zip: record time stamps in "Extended Timestamp Extra Field" · Issue #10242 · golang/go · GitHub.