Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Noted that TIME_ZONE must be the server time zone when time zone supp…

…ort is enabled and pytz isn't installed.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17577 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8842183448862377b5fa2107d5d5c5d2aa78b9b9 1 parent 8b53616
Aymeric Augustin authored February 22, 2012

Showing 1 changed file with 17 additions and 9 deletions. Show diff stats Hide diff stats

  1. 26  docs/ref/settings.txt
26  docs/ref/settings.txt
@@ -2086,14 +2086,14 @@ one of the choices for a given time zone. For instance, one line says
2086 2086
 ``'Europe/London GB GB-Eire'``, but you should use the first bit of
2087 2087
 that -- ``'Europe/London'`` -- as your :setting:`TIME_ZONE` setting.)
2088 2088
 
2089  
-Note that this isn't necessarily the timezone of the server. For example, one
  2089
+Note that this isn't necessarily the time zone of the server. For example, one
2090 2090
 server may serve multiple Django-powered sites, each with a separate time zone
2091 2091
 setting.
2092 2092
 
2093  
-When :setting:`USE_TZ` is ``False``, this is the time zone in which Django will
2094  
-store all datetimes. When :setting:`USE_TZ` is ``True``, this is the default
2095  
-time zone that Django will use to display datetimes in templates and to
2096  
-interpret datetimes entered in forms.
  2093
+When :setting:`USE_TZ` is ``False``, this is the time zone in which Django
  2094
+will store all datetimes. When :setting:`USE_TZ` is ``True``, this is the
  2095
+default time zone that Django will use to display datetimes in templates and
  2096
+to interpret datetimes entered in forms.
2097 2097
 
2098 2098
 Django sets the ``os.environ['TZ']`` variable to the time zone you specify in
2099 2099
 the :setting:`TIME_ZONE` setting. Thus, all your views and models will
@@ -2105,18 +2105,26 @@ environment variable under the following conditions:
2105 2105
   <settings-without-django-settings-module>`, or
2106 2106
 
2107 2107
 * If you specify ``TIME_ZONE = None``. This will cause Django to fall
2108  
-  back to using the system timezone.
  2108
+  back to using the system time zone.
2109 2109
 
2110 2110
 If Django doesn't set the ``TZ`` environment variable, it's up to you
2111 2111
 to ensure your processes are running in the correct environment.
2112 2112
 
2113 2113
 .. note::
2114  
-    Django cannot reliably use alternate time zones in a Windows
2115  
-    environment. If you're running Django on Windows, this variable
2116  
-    must be set to match the system timezone.
  2114
+    When time zone support is enabled (:setting:`USE_TZ = True <USE_TZ>`),
  2115
+    Django needs a definition of the default time zone. Therefore, you must
  2116
+    either install pytz_ (which is recommended) or set :setting:`TIME_ZONE`
  2117
+    to the system time zone.
  2118
+
  2119
+.. note::
  2120
+    Django cannot reliably use alternate time zones in a Windows environment.
  2121
+    If you're running Django on Windows, :setting:`TIME_ZONE` must be set to
  2122
+    match the system time zone.
2117 2123
 
2118 2124
 .. _See available choices: http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
2119 2125
 
  2126
+.. _pytz: http://pytz.sourceforge.net/
  2127
+
2120 2128
 .. setting:: URL_VALIDATOR_USER_AGENT
2121 2129
 
2122 2130
 URL_VALIDATOR_USER_AGENT

0 notes on commit 8842183

Please sign in to comment.
Something went wrong with that request. Please try again.