diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2013-07-24 22:04:42 +0200 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2013-07-24 22:04:42 +0200 |
commit | 813a8baee30fd1c82e30156c4cf04dc5c68e0339 (patch) | |
tree | 0b3f83ec69c9950dc37352b75258a27a35370fc3 /docs | |
parent | 71fdc983e196e884e4d0474d2f094f0080f836ed (diff) | |
download | babel-813a8baee30fd1c82e30156c4cf04dc5c68e0339.tar.gz |
Added a block about LOCALTZ
Diffstat (limited to 'docs')
-rw-r--r-- | docs/dates.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/dates.rst b/docs/dates.rst index 6b83766..6cd09a3 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 + <DstTzInfo 'Europe/Vienna' CET+1:00:00 STD> + >>> get_timezone_name(LOCALTZ) + u'Central European Time' + .. _pytz: http://pytz.sourceforge.net/ |