How to set the timezone for docker container

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

This article only applies to Atlassian's docker. Learn more about the Atlassian docker here.

NOTE

Confluence Docker image is published as both atlassian/confluence and atlassian/confluence-server. These are the same image, but the -server version is deprecated and only kept for backwards-compatibility; for new installations it is recommended to use the shorter name.

The timezone value in Atlassian docker container by default is GMT, however, it is possible to alter this default by passing an additional parameter to the container with -e TZ=<TIMEZONE>.

Solution

Docker

Here is the docker run command example setting:

1 2 3 4 5 6 7 docker run \ --name="confluence" -d \ -p 8090:8090 \ -p 8091:8091 \ -v ~/confluence-home/confluence-docker:/var/atlassian/application-data/confluence \ -e TZ=Australia/Sydney \ atlassian/confluence

ℹ️Normally this command is run as one line.

Kubernetes

In Kubernetes, find and add the following setting to the Helm chart configuration YAML file:

1 2 3 4 5 6 7 # -- Defines any additional environment variables to be passed to the Confluence # container. See https://hub.docker.com/r/atlassian/confluence for # supported variables. # additionalEnvironmentVariables: - name: TZ value: Australia/Sydney

The list of the timezone supported by Confluence is as below: (Copied from Confluence source code timezones.properties file)

timezones.properties

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 GMT, \ Pacific/Apia, \ HST, \ AST, \ America/Los_Angeles, \ America/Phoenix, \ America/Mazatlan, \ America/Denver, \ America/Belize, \ America/Chicago, \ America/Mexico_City, \ America/Regina, \ America/Bogota, \ America/New_York, \ America/Indianapolis, \ America/Halifax, \ America/Caracas, \ America/Santiago, \ America/St_Johns, \ America/Sao_Paulo, \ America/Buenos_Aires, \ America/Godthab, \ Atlantic/South_Georgia, \ Atlantic/Azores, \ Atlantic/Cape_Verde, \ Africa/Casablanca, \ Europe/Dublin, \ Europe/Berlin, \ Europe/Belgrade, \ Europe/Paris, \ Europe/Warsaw, \ ECT, \ Europe/Athens, \ Europe/Minsk, \ Europe/Bucharest, \ Africa/Cairo, \ Africa/Harare, \ Europe/Helsinki, \ Asia/Jerusalem, \ Asia/Baghdad, \ Asia/Kuwait, \ Europe/Moscow, \ Africa/Nairobi, \ Asia/Tehran, \ Asia/Muscat, \ Asia/Baku, \ Asia/Kabul, \ Asia/Yekaterinburg, \ Asia/Karachi, \ Asia/Calcutta, \ Asia/Katmandu, \ Asia/Almaty, \ Asia/Dhaka, \ Asia/Colombo, \ Asia/Rangoon, \ Asia/Bangkok, \ Asia/Krasnoyarsk, \ Asia/Hong_Kong, \ Asia/Irkutsk, \ Asia/Kuala_Lumpur, \ Australia/Perth, \ Asia/Taipei, \ Asia/Tokyo, \ Asia/Seoul, \ Asia/Yakutsk, \ Australia/Adelaide, \ Australia/Darwin, \ Australia/Brisbane, \ Australia/Sydney, \ Pacific/Guam, \ Australia/Hobart, \ Asia/Vladivostok, \ Pacific/Noumea, \ Pacific/Auckland, \ Pacific/Fiji, \ Pacific/Tongatapu

Updated on April 17, 2025

Still need help?

The Atlassian Community is here for you.