Opened 9 years ago

Closed 9 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 Baptiste Mispelon, 9 years ago

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

comment:2 by Aymeric Augustin, 9 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 Tim Graham, 9 years ago

Component: UncategorizedCore (Other)
Resolution: wontfix
Status: newclosed
Summary: TIME_ZONE in settings.py is extremely flimsyMake settings.TIME_ZONE more flexible in the values it accepts
Type: UncategorizedNew feature
Version: 1.8master

If so, please raise the issue on the DevelopersMailingList, thanks.

Note: See TracTickets for help on using tickets.
Back to Top