Skip to content

Commit

Permalink
Use TIME_ZONE environment variable when available
Browse files Browse the repository at this point in the history
Connects to archivematica/Issues#291

Co-authored-by: Jesús García Crespo <[email protected]>
  • Loading branch information
scollazo and sevein authored Mar 9, 2020
1 parent 9778b0f commit ed10c12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ of these settings or provide values to mandatory fields.
- **Type:** `string`
- :red_circle: **Mandatory!**

- **`TIME_ZONE`**:
- **Description:** application time zone. See [TIME_ZONE](https://docs.djangoproject.com/en/1.8/ref/settings/#time-zone) for more details.
- **Type:** `string`
- **Default:** `"America/Los_Angeles"`

- **`SECRET_KEY`**:
- **Description:** a secret key used for cryptographic signing. See [SECRET_KEY](https://docs.djangoproject.com/en/1.8/ref/settings/#secret-key) for more details.
- **Type:** `string`
Expand Down
2 changes: 1 addition & 1 deletion storage_service/storage_service/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def get_env_variable(var_name):

# ######## GENERAL CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#time-zone
TIME_ZONE = "America/Los_Angeles"
TIME_ZONE = environ.get("TIME_ZONE", "America/Los_Angeles")

# See: https://docs.djangoproject.com/en/dev/ref/settings/#language-code
LANGUAGE_CODE = "en-us"
Expand Down

0 comments on commit ed10c12

Please sign in to comment.