Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for setting the timezone in Docker #5008

Merged
merged 1 commit into from
Jul 14, 2022

Conversation

tobia
Copy link
Contributor

@tobia tobia commented Jul 12, 2022

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 the
timezone package to openSUSE builds. This allows docker users to run the containers
with a custom timezone by simply passing a TZ env variable. For example:

docker run -e TZ=Australia/Sydney collabora/code

Docker images based on Debian already include the tzdata package, therefore no change is needed.

Checklist

  • Code is properly formatted
  • All commits have Change-Id
  • I have run tests with make check
  • I have issued make run and manually verified that everything looks okay
  • Documentation (manuals or wiki) has been updated or is not required

@welcome
Copy link

welcome bot commented Jul 12, 2022

Thanks for opening this pull request!

Things that will help get your PR across the finish line:

Added the 'tzdata' package to Ubuntu-based Docker builds and the
'timezone' package to openSUSE builds, to allow Docker users to run
the containers with a custom timezone by passing a TZ env variable.

Signed-off-by: Tobia Conforto <tobia.conforto@gmail.com>
Change-Id: Idafd84dde3383b4801ff4b3ebb8ac1826fe49fcc
@pedropintosilva
Copy link
Contributor

Hello @tobia and thanks for taking the time to setup Collabora Online and attempt to contribute! I think this one is best to be reviewed by @timar :)

@pedropintosilva pedropintosilva merged commit aba9091 into CollaboraOnline:master Jul 14, 2022
@welcome
Copy link

welcome bot commented Jul 14, 2022

Thanks a lot for your contribution, and congrats on your first pull request merged! Welcome aboard! 🎉🎉🎉

If you haven't decided on your next task yet, take a look at our easy-hacks. We're looking forward to your next pull request! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants