Added notes to docs regarding new requirement for time zone definitions #1620

Closed
wants to merge 2 commits into
from

2 participants

@mattaustin

Time zone definitions required in database for day, month, and week_day lookups.

https://code.djangoproject.com/ticket/21095

@timgraham timgraham commented on an outdated diff Sep 12, 2013
docs/releases/1.6.txt
@@ -435,6 +435,17 @@ but will not be removed from Django until version 1.8.
.. _recommendations in the Python documentation: http://docs.python.org/2/library/doctest.html#unittest-api
+
@timgraham
Django member
timgraham added a line comment Sep 12, 2013

only 1 space between sections (above a below this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@timgraham timgraham and 2 others commented on an outdated diff Sep 12, 2013
docs/releases/1.6.txt
@@ -435,6 +435,17 @@ but will not be removed from Django until version 1.8.
.. _recommendations in the Python documentation: http://docs.python.org/2/library/doctest.html#unittest-api
+
+Time zone support for ``day``, ``month``, and ``week_day`` lookups
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Django 1.6 introduces time zone support for ``day``, ``month``, and ``week_day``
+lookups, which were previously performed in UTC rather than the active timezone.
@timgraham
Django member
timgraham added a line comment Sep 12, 2013

by "active timezone" I assume you mean :setting:`TIME_ZONE`?

@charettes
Django member
charettes added a line comment Sep 12, 2013

Not necessarily. It defaults to :setting:TIME_ZONE but one can set it manually using django.utils.timezone.activate (which is thread local) the same way django.utils.translation.activate works.

@mattaustin
mattaustin added a line comment Sep 12, 2013

Maybe we should refer to it as 'current timezone'? The time zone which has been activated in the thread, (or settings.TIME_ZONE as a default) is returned by the django.utils.timezone.get_current_timezone() method.

@timgraham
Django member
timgraham added a line comment Sep 12, 2013

Yea, I guess "current" would be be consistent with https://docs.djangoproject.com/en/dev/topics/i18n/timezones/#selecting-the-current-time-zone

Although I'm sure someone who uses timezone support more than I do would understand either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mattaustin

Thanks for the feedback, I've made a small update to refer to 'current time zone', and remove the superfluous blank lines. If accepted, these doc updates will also need to be cherry-picked to stable-1.6.x and stable-1.7.x branches.

@timgraham
Django member

merged in 9451d8d

@timgraham timgraham closed this Sep 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment