summaryrefslogtreecommitdiff
path: root/docs/ref/settings.txt
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-02-26 15:33:27 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-02-26 15:33:27 +0000
commit46cc7021a8ab60190d81e9d7e039cd84efbafb23 (patch)
tree5f809c291af834fb5a2cd2d122ca849c26062ae3 /docs/ref/settings.txt
parent0ff624a3cb075800e6c84cf80e36b085e23cf270 (diff)
Fixed #1480 -- Added the ability to use the system timezone. Thanks to Ramiro Morales for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12602 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref/settings.txt')
-rw-r--r--docs/ref/settings.txt50
1 files changed, 32 insertions, 18 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
index 0601e21ab7..9621ec5b12 100644
--- a/docs/ref/settings.txt
+++ b/docs/ref/settings.txt
@@ -1505,28 +1505,42 @@ TIME_ZONE
Default: ``'America/Chicago'``
-A string representing the time zone for this installation. `See available choices`_.
-(Note that list of available choices lists more than one on the same line;
-you'll want to use just one of the choices for a given time zone. For instance,
-one line says ``'Europe/London GB GB-Eire'``, but you should use the first bit
-of that -- ``'Europe/London'`` -- as your ``TIME_ZONE`` setting.)
+.. versionchanged:: 1.2
+ ``None`` was added as an allowed value.
+
+A string representing the time zone for this installation, or
+``None``. `See available choices`_. (Note that list of available
+choices lists more than one on the same line; you'll want to use just
+one of the choices for a given time zone. For instance, one line says
+``'Europe/London GB GB-Eire'``, but you should use the first bit of
+that -- ``'Europe/London'`` -- as your ``TIME_ZONE`` setting.)
+
+Note that this is the time zone to which Django will convert all
+dates/times -- not necessarily the timezone of the server. For
+example, one server may serve multiple Django-powered sites, each with
+a separate time-zone setting.
-Note that this is the time zone to which Django will convert all dates/times --
-not necessarily the timezone of the server. For example, one server may serve
-multiple Django-powered sites, each with a separate time-zone setting.
+Normally, Django sets the ``os.environ['TZ']`` variable to the time
+zone you specify in the ``TIME_ZONE`` setting. Thus, all your views
+and models will automatically operate in the correct time zone.
+However, Django won't set the ``TZ`` environment variable under the
+following conditions:
-Normally, Django sets the ``os.environ['TZ']`` variable to the time zone you
-specify in the ``TIME_ZONE`` setting. Thus, all your views and models will
-automatically operate in the correct time zone. However, if you're manually
-:ref:`manually configuring settings
-<settings-without-django-settings-module>`, Django will *not* touch the ``TZ``
-environment variable, and it'll be up to you to ensure your processes are
-running in the correct environment.
+ * If you're using the manual configuration option as described in
+ :ref:`manually configuring settings
+ <settings-without-django-settings-module>`, or
+
+ * If you specify ``TIME_ZONE = None``. This will cause Django to fall
+ back to using the system timezone.
+
+If Django doesn't set the ``TZ`` environment variable, it's up to you
+to ensure your processes are running in the correct environment.
.. note::
- Django cannot reliably use alternate time zones in a Windows environment.
- If you're running Django on Windows, this variable must be set to match the
- system timezone.
+ Django cannot reliably use alternate time zones in a Windows
+ environment. If you're running Django on Windows, this variable
+ must be set to match the system timezone.
+
.. _See available choices: http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE