From a9a729e500dc3863adf75419b5f9fd4368bd571f Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Date: Tue, 24 Feb 2015 19:06:31 +0530 Subject: [PATCH] feat(templating): make TIMEZONE default to UTC and configurable Thanks @burhan for reportings this. closes #109 --- cookiecutter.json | 1 + .../{{cookiecutter.repo_name}}/config/common.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cookiecutter.json b/cookiecutter.json index a91e22aa..d1a9775e 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -6,6 +6,7 @@ "description": "A short description of the project.", "domain_name": "example.com", "version": "0.1.0", + "timezone": "UTC", "now": "2015/01/13", "year": "{{ cookiecutter.now[:4] }}" } diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/common.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/common.py index 8e0d0f6b..2af88bf9 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/common.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/common.py @@ -126,8 +126,12 @@ class Common(Configuration): # END CACHING # GENERAL CONFIGURATION - # See: https://docs.djangoproject.com/en/dev/ref/settings/#time-zone - TIME_ZONE = 'America/Los_Angeles' + + # Local time zone for this installation. Choices can be found here: + # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name + # although not all choices may be available on all operating systems. + # In a Windows environment this must be set to your system time zone. + TIME_ZONE = '{{ cookiecutter.timezone }}' # See: https://docs.djangoproject.com/en/dev/ref/settings/#language-code LANGUAGE_CODE = 'en-us'