Added support for setting the timezone in Docker #5008
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Several functions in Collabora Online depend on the server timezone setting.
The most common is possibly the rendering of dates and times using the
<text:date>
tag in order to include the current date and time in the header or footer of documents.
Unfortunately current docker images do not provide any means to change the timezone
from the default UTC. Linux docker users should be able to mount the system's
/etc/localtime
and similar system files, but this is a hack, does not support users in other platforms, and
does not seem to work in recent versions of the docker images.
This commit adds the the
tzdata
package to Ubuntu-based docker builds and thetimezone
package to openSUSE builds. This allows docker users to run the containerswith a custom timezone by simply passing a TZ env variable. For example:
Docker images based on Debian already include the
tzdata
package, therefore no change is needed.Checklist
make check
make run
and manually verified that everything looks okay