Opened 10 years ago
Closed 10 years ago
#24825 closed New feature (wontfix)
Make settings.TIME_ZONE more flexible in the values it accepts
Reported by: | Lynn Cyrin | Owned by: | nobody |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
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
I tried all these time zone formats, which all failed with ValueError Incorrect timezone setting
UTC-07:00
PST
US/California
USA/California
America/California
Before my google searching eventually found that I could do
America/Los_Angeles
It's really not reasonable that it took me 6 tries and a google search to get that right.... TIME_ZONE needs to be changed to be more flexible
Change History (3)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Searching for "django time_zone" takes you straight to https://docs.djangoproject.com/en/1.8/ref/settings/#time-zone. The first line here links to the list of time zones. Reading the documentation usually works better than typing random values and then complaining that they don't work :-)
Do you have a concrete proposal for accepting values not included in the standard TZ database? We certainly don't want to maintain a custom TZ database just for Django.
I'm strongly against copying the docs in the settings file generated by the default project template because, if we start down this path, we'll add stuff incrementally until we have a partial and out-of-sync version of the settings reference.
comment:3 by , 10 years ago
Component: | Uncategorized → Core (Other) |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Summary: | TIME_ZONE in settings.py is extremely flimsy → Make settings.TIME_ZONE more flexible in the values it accepts |
Type: | Uncategorized → New feature |
Version: | 1.8 → master |
If so, please raise the issue on the DevelopersMailingList, thanks.
Hi,
As far as I know, the names of time zones are standardized so I don't think we can make Django more flexible in what it accepts.
How about adding a comment in the default project template that points to a list of available names [1] instead?
Thanks.
[1] http://en.wikipedia.org/wiki/List_of_tz_database_time_zones