From b3d33811ece8d3a3de2ffa8ad7f134b94c96d95d Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Wed, 25 Jan 2023 21:46:40 +0200 Subject: Finally remove get_next_timezone_transition (#958) --- docs/api/dates.rst | 2 -- docs/dates.rst | 23 +---------------------- 2 files changed, 1 insertion(+), 24 deletions(-) (limited to 'docs') 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 - 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 -- cgit v1.2.1