Mercurial > babel > mirror
comparison doc/formatting.txt @ 31:f3049ca45daa trunk
Raise error on unsupported locales. Closes #5.
author | cmlenz |
---|---|
date | Mon, 04 Jun 2007 11:29:55 +0000 |
parents | 72bf45adb926 |
children | ac0957a8fd8b |
comparison
equal
deleted
inserted
replaced
30:4a2b3ba40b7c | 31:f3049ca45daa |
---|---|
190 | | ``v`` | Use one letter for short wall (generic) time, four for | | 190 | | ``v`` | Use one letter for short wall (generic) time, four for | |
191 | | | long wall time. | | 191 | | | long wall time. | |
192 +----------+--------+--------------------------------------------------------+ | 192 +----------+--------+--------------------------------------------------------+ |
193 | 193 |
194 | 194 |
195 Time-zone Support | 195 Time-Zone Support |
196 ----------------- | 196 ----------------- |
197 | 197 |
198 Many of the verbose default time formats include the time-zone, but the | 198 Many of the verbose time formats include the time-zone, but time-zone |
199 time-zone is not by default available for the Python ``datetime`` and ``time`` | 199 information is not by default available for the Python ``datetime`` and |
200 objects. The standard library includes only the abstract ``tzinfo`` class, | 200 ``time`` objects. The standard library includes only the abstract ``tzinfo`` |
201 which you need appropriate implementations for to actually use in your | 201 class, which you need appropriate implementations for to actually use in your |
202 application. Babel includes a ``tzinfo`` implementation for UTC (Universal | 202 application. Babel includes a ``tzinfo`` implementation for UTC (Universal |
203 Time). For actual time-zones, it is strongly recommended that you use the | 203 Time). |
204 | |
205 For real time-zone support, it is strongly recommended that you use the | |
204 third-party package `pytz`_, which includes the definitions of practically all | 206 third-party package `pytz`_, which includes the definitions of practically all |
205 of the time-zones used on the world, as well as important functions for | 207 of the time-zones used on the world, as well as important functions for |
206 reliably converting from UTC to local time, and vice versa:: | 208 reliably converting from UTC to local time, and vice versa:: |
207 | 209 |
208 >>> from datetime import time | 210 >>> from datetime import time |