File: tzinfo.py

package info (click to toggle)
python-django 1.2.3-3%2Bsqueeze10
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 29,064 kB
  • ctags: 20,458
  • sloc: python: 101,293; xml: 574; makefile: 149; sh: 121; sql: 7
file content (30 lines) | stat: -rw-r--r-- 436 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""
>>> from django.utils.tzinfo import FixedOffset

>>> FixedOffset(0)
+0000
>>> FixedOffset(60)
+0100
>>> FixedOffset(-60)
-0100
>>> FixedOffset(280)
+0440
>>> FixedOffset(-280)
-0440
>>> FixedOffset(-78.4)
-0118
>>> FixedOffset(78.4)
+0118
>>> FixedOffset(-5.5*60)
-0530
>>> FixedOffset(5.5*60)
+0530
>>> FixedOffset(-.5*60)
-0030
>>> FixedOffset(.5*60)
+0030
"""

if __name__ == "__main__":
    import doctest
    doctest.testmod()