Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.

Commit ae03152

Browse files
ChillarAnandMatthew Fisher
authored andcommitted
feat(settings): Get timezone from environment variable (#1196)
If user has set a specific timezone, use that timezone instead of default UTC.
1 parent 0e3e130 commit ae03152

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

charts/controller/templates/controller-deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ spec:
7575
key: image
7676
- name: "IMAGE_PULL_POLICY"
7777
value: "{{ .Values.app_pull_policy }}"
78+
- name: "TZ"
79+
value: "{{ default 'UTC' .Values.time_zone }}"
7880
{{- if (.Values.deploy_hook_urls) }}
7981
- name: DEIS_DEPLOY_HOOK_URLS
8082
value: "{{ .Values.deploy_hook_urls }}"

rootfs/api/settings/production.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
3535
# although not all choices may be available on all operating systems.
3636
# In a Windows environment this must be set to your system time zone.
37-
TIME_ZONE = 'UTC'
37+
TIME_ZONE = os.environ.get('TZ', 'UTC')
3838

3939
# Language code for this installation. All choices can be found here:
4040
# http://www.i18nguy.com/unicode/language-identifiers.html

0 commit comments

Comments
 (0)