Django

Code

Ticket #1977 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

[patch] Wrong URL for timezone advice in settings.py

Reported by: Joeboy Assigned to: adrian
Milestone: Component: Django Web site
Version: 0.95 Keywords: timezone datetime
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

The boilerplate settings.py contains the following advice:

# Local time zone for this installation. All choices can be found here:

# http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE

I looked at that list and naively set my timezone to 'Europe/London GB GB-Eire'. Consequently my (mysql) database lookups broke in a confusing way. Setting it to just 'Europe/London' instead fixed the problem.

Cheers.

Attachments

tz-settings.diff (0.7 kB) - added by regexbot@gmail.com on 12/15/06 07:03:15.
patch for timezone link in settings.py boilerplate

Change History

05/23/06 08:19:52 changed by mtredinnick

To explain a bit more what the problem here is: if you set the timezone to 'Europe/London' then all the date/time functions respect DST settings. With a string like 'Europe/London GB GB-Eire', it is internally mapped to something like "UTC + 0 always" at some level (not sure whether it's in the Python library or the C library). So, today, the longer setting for TIME_ZONE will mean that datetime.datetime.now() inside Django will be wrong (due to daylight savings being in effect in London).

PostgreSQL is too flexible in what it accepts. C libraries, not so much.

06/10/06 10:28:54 changed by nirvdrum

I dunno about that. If you read the text just before the table, you see "In many cases there are several equivalent names for the same zone. These are listed on the same line."

The confusing part is that they don't say the names are separated by spaces (I guess that's to be inferred by the use of slashes for linking names). I think the documentation says that each of those names are equivalent, however.

07/07/06 17:39:44 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

(In [3297]) Fixed #1977 -- Added clarification about TIME_ZONE setting.

12/13/06 22:01:32 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.
  • summary changed from Misleading timezone advice in settings.py to Wrong URL for timezone advice in settings.py.

12/13/06 22:07:33 changed by anonymous

  • version changed from SVN to 0.95.
  • component changed from django-admin.py to Django Web site.
  • severity changed from normal to minor.

12/13/06 22:15:31 changed by adrian

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [4201]) Fixed #1977 -- Changed postgresql.org link regarding timezone choices in docs/settings.txt

12/15/06 07:01:04 changed by regexbot@gmail.com

  • status changed from closed to reopened.
  • resolution deleted.

The issue still exists in django/conf/project_template/settings.py... ;-)

12/15/06 07:03:15 changed by regexbot@gmail.com

  • attachment tz-settings.diff added.

patch for timezone link in settings.py boilerplate

12/15/06 07:04:47 changed by regexbot@gmail.com

  • summary changed from Wrong URL for timezone advice in settings.py to [patch] Wrong URL for timezone advice in settings.py.

Patch attached.

12/15/06 09:56:43 changed by adrian

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [4207]) Fixed #1977 -- Changed postgresql.org URL in global_settings.py and project_template/settings.py. Thanks, regexbot@gmail.com


Add/Change #1977 ([patch] Wrong URL for timezone advice in settings.py)




Change Properties
Action