Ticket #2099: dateformat_win32.patch
File dateformat_win32.patch, 1.8 KB (added by , 18 years ago) |
---|
-
tests/regressiontests/dateformat/tests.py
21 21 '7' 22 22 >>> format(my_birthday, 'N') 23 23 'July' 24 >>> format(my_birthday, 'O') 25 '+0100' 24 >>> format(my_birthday, 'O') == '+0100' or no_tz 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 >>> format(my_birthday, 'r') == 'Sun, 8 Jul 1979 22:00:00 +0100' or no_tz 29 True 30 30 >>> format(my_birthday, 's') 31 31 '00' 32 32 >>> format(my_birthday, 'S') 33 33 'th' 34 34 >>> format(my_birthday, 't') 35 35 '31' 36 >>> format(my_birthday, 'T') 37 'CET' 38 >>> format(my_birthday, 'U') 39 '300531600' 36 >>> format(my_birthday, 'T') == 'CET' or no_tz 37 True 38 >>> format(my_birthday, 'U') == '300531600' or no_tz 39 True 40 40 >>> format(my_birthday, 'w') 41 41 '0' 42 42 >>> format(my_birthday, 'W') … … 47 47 '1979' 48 48 >>> format(my_birthday, 'z') 49 49 '189' 50 >>> format(my_birthday, 'Z') 51 '3600' 50 >>> format(my_birthday, 'Z') == '3600' or no_tz 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 >>> format(summertime, 'I') == '1' or no_tz 54 True 55 >>> format(summertime, 'O') == '+0200' or no_tz 56 True 57 >>> format(wintertime, 'I') == '0' or no_tz 58 True 59 >>> format(wintertime, 'O') == '+0100' or no_tz 60 True 61 61 62 62 >>> format(my_birthday, r'Y z \C\E\T') 63 63 '1979 189 CET' … … 73 73 os.environ['TZ'] = 'Europe/Copenhagen' 74 74 translation.activate('en-us') 75 75 76 time.tzset() 76 no_tz = False 77 try: 78 time.tzset() 79 except AttributeError: 80 no_tz = True 77 81 78 82 my_birthday = datetime.datetime(1979, 7, 8, 22, 00) 79 83 summertime = datetime.datetime(2005, 10, 30, 1, 00)