"enhancement" request? default docker images include setting the time zone setting and related file

May I request that the default docker images include setting the time zone setting and related file(s), to read the local machine time zone?

Or, include that option in the docker-compose.yml files?

Interesting, are you encountering an issue with the way they are currently set up?

Do you know how to achieve it?

The logs I have browsed are time stamped 5 hours ahead of local time.

I have found some ways, by browsing, but there are differences of opinion on the “best” way.

I ran across this example, but have no direct experience to relate:Using docker-compose to set containers timezones - Stack Overflow

Hope that helps.

For me, a solution entailed adding, in docker-compose.yml, the following lines to each container volumes list:


I googled and found that you can just set the time zone by setting the TZ environment variable. In any case, whether it’s a volume or an environment variable, it has nothing to do with the image itself, so nothing to change there.

I suggested a change to the “images” without much thought.

Now I would only suggest a change to the docker-compose.yml examples to mention the option, with examples, even if commented out as the default.

One would think everyone would prefer the time stamps to be in their own time zone. I did not check, but presume any time stamps made with data entered via gramps web itself, would reflect “docker time” as did the logs.


Gramps (not just Gramps Web) stores all time stamps as Unix time stamps, which are timezone agnostic. Localized time stamps are displayed in Gramps Web based on Browser settings, so they respect the time zone of the user viewing the app (which is independent of the server’s time zone and can be different for different users). In general, there is no guarantee the users are in the same time zone as the server, so I personally think UTC is the perfect server time zone. In any case, I don’t think it’s a reason to further complicate our examples.

Nevertheless, thanks for the useful observation. This thread will stay as reference for users interested in this specific case.

1 Like