Opened 7 years ago
Closed 7 years ago
#28829 closed Uncategorized (needsinfo)
Timezone is recognized only when provided in CamelCase
Reported by: | shanushaan | Owned by: | nobody |
---|---|---|---|
Component: | Core (Other) | Version: | 1.11 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Initially the settings.py had the
time_zone = "ASIA/KOLKATA"
which was not recognized by django and gave the exception
pytz.exceptions.UnknownTimeZoneError: 'asia/kolkata'
when changed the code to
time_zone = "Asia/Kolkata"
it started the server fine.
Change History (3)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Firstly it is not because of CamelCase but because of matching value of this setting to file in /usr/share/zoneinfo.
If this file does not exist than exception is raised.
Secondly i am not sure should this ticket be fixed.
If there are two different timezones which are equal when we ignore cases, than it is ambigous, which timezone should be chosen.
Of course it is possible to match this file without taking care of case sensivity, but to submit PR i need decision what to.
comment:3 by , 7 years ago
Component: | Core (System checks) → Core (Other) |
---|---|
Resolution: | → needsinfo |
Status: | new → closed |
Absent some clarification of what this ticket is suggesting, the current behavior seems fine to me.
What change are you proposing? The casing in the list of accepted timezones that the documentation points to looks correct.