diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/api/dates.rst | 2 | ||||
-rw-r--r-- | docs/dates.rst | 23 |
2 files changed, 1 insertions, 24 deletions
diff --git a/docs/api/dates.rst b/docs/api/dates.rst index 55ea2b1..cbdac59 100644 --- a/docs/api/dates.rst +++ b/docs/api/dates.rst @@ -32,8 +32,6 @@ Timezone Functionality .. autofunction:: get_timezone_name -.. autofunction:: get_next_timezone_transition - .. data:: UTC A timezone object for UTC. diff --git a/docs/dates.rst b/docs/dates.rst index 8b35091..1827a9a 100644 --- a/docs/dates.rst +++ b/docs/dates.rst @@ -308,28 +308,7 @@ applied to ``format_time``, but because the actual date is unknown in that case, the current day is assumed to determine whether DST or standard time should be used. -For many timezones it's also possible to ask for the next timezone -transition. This for instance is useful to answer the question “when do I -have to move the clock forward next”: - -.. warning:: ``get_next_timezone_transition`` is deprecated and will be removed - in the next version of Babel - -.. code-block:: pycon - - >>> t = get_next_timezone_transition('Europe/Vienna', datetime(2011, 3, 2)) - >>> t - <TimezoneTransition CET -> CEST (2011-03-27 01:00:00)> - >>> t.from_offset - 3600.0 - >>> t.to_offset - 7200.0 - >>> t.from_tz - 'CET' - >>> t.to_tz - 'CEST' - -Lastly Babel also provides support for working with the local timezone of +Babel also provides support for working with the local timezone of your operating system. It's provided through the ``LOCALTZ`` constant: .. code-block:: pycon |