From: Armin Ronacher Date: Wed, 24 Jul 2013 20:04:42 +0000 (+0200) Subject: Added a block about LOCALTZ X-Git-Tag: 1.0~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=813a8baee30fd1c82e30156c4cf04dc5c68e0339;p=thirdparty%2Fbabel.git Added a block about LOCALTZ --- diff --git a/docs/dates.rst b/docs/dates.rst index 6b837660..6cd09a3f 100644 --- a/docs/dates.rst +++ b/docs/dates.rst @@ -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 + + >>> get_timezone_name(LOCALTZ) + u'Central European Time' + .. _pytz: http://pytz.sourceforge.net/