Changeset 3862
- Timestamp:
- 09/26/06 08:38:19 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/tests/regressiontests/dateformat/tests.py
r3661 r3862 22 22 >>> format(my_birthday, 'N') 23 23 'July' 24 >>> format(my_birthday, 'O')25 '+0100' 24 >>> no_tz or format(my_birthday, 'O') == '+0100' 25 True 26 26 >>> format(my_birthday, 'P') 27 27 '10 p.m.' 28 >>> format(my_birthday, 'r')29 'Sun, 8 Jul 1979 22:00:00 +0100' 28 >>> no_tz or format(my_birthday, 'r') == 'Sun, 8 Jul 1979 22:00:00 +0100' 29 True 30 30 >>> format(my_birthday, 's') 31 31 '00' … … 34 34 >>> format(my_birthday, 't') 35 35 '31' 36 >>> format(my_birthday, 'T')37 'CET' 38 >>> format(my_birthday, 'U')39 '300531600' 36 >>> no_tz or format(my_birthday, 'T') == 'CET' 37 True 38 >>> no_tz or format(my_birthday, 'U') == '300531600' 39 True 40 40 >>> format(my_birthday, 'w') 41 41 '0' … … 48 48 >>> format(my_birthday, 'z') 49 49 '189' 50 >>> format(my_birthday, 'Z')51 '3600' 50 >>> no_tz or format(my_birthday, 'Z') == '3600' 51 True 52 52 53 >>> format(summertime, 'I')54 '1' 55 >>> format(summertime, 'O')56 '+0200' 57 >>> format(wintertime, 'I')58 '0' 59 >>> format(wintertime, 'O')60 '+0100' 53 >>> no_tz or format(summertime, 'I') == '1' 54 True 55 >>> no_tz or format(summertime, 'O') == '+0200' 56 True 57 >>> no_tz or format(wintertime, 'I') == '0' 58 True 59 >>> no_tz or format(wintertime, 'O') == '+0100' 60 True 61 61 62 62 >>> format(my_birthday, r'Y z \C\E\T') … … 74 74 translation.activate('en-us') 75 75 76 time.tzset() 76 try: 77 time.tzset() 78 no_tz = False 79 except AttributeError: 80 no_tz = True 77 81 78 82 my_birthday = datetime.datetime(1979, 7, 8, 22, 00)
