]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Added a block about LOCALTZ
authorArmin Ronacher <armin.ronacher@active-4.com>
Wed, 24 Jul 2013 20:04:42 +0000 (22:04 +0200)
committerArmin Ronacher <armin.ronacher@active-4.com>
Wed, 24 Jul 2013 20:04:42 +0000 (22:04 +0200)
docs/dates.rst

index 6b837660a84236369b608a172b8292080470d052..6cd09a3f5eea38e43891c3e4c1c0edb0bee33a4e 100644 (file)
@@ -320,6 +320,17 @@ have to move the clock forward next”:
     >>> t.to_tz
     'CEST'
 
+Lastly Babel also provides support for working with the local timezone of
+your operating system.  It's provided through the ``LOCALTZ`` constant:
+
+.. code-block:: pycon
+
+    >>> from babel.dates import LOCALTZ, get_timezone_name
+    >>> LOCALTZ
+    <DstTzInfo 'Europe/Vienna' CET+1:00:00 STD>
+    >>> get_timezone_name(LOCALTZ)
+    u'Central European Time'
+
 .. _pytz: http://pytz.sourceforge.net/