diff options
author | Guido van Rossum <guido@python.org> | 1997-08-12 18:21:08 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-08-12 18:21:08 (GMT) |
commit | 9d9af2c7a897dc3071cad8277e463da4f7f5b61b (patch) | |
tree | b2d5bcc2592495f7f713694a5a16e308da4ec32e /Lib/test/test_strftime.py | |
parent | a5e9fb6a65c37e769e8a1eb4e7e2cac6c9500b9c (diff) | |
download | cpython-9d9af2c7a897dc3071cad8277e463da4f7f5b61b.zip cpython-9d9af2c7a897dc3071cad8277e463da4f7f5b61b.tar.gz cpython-9d9af2c7a897dc3071cad8277e463da4f7f5b61b.tar.bz2 |
Fixes for the Mac. (Jack)
Diffstat (limited to 'Lib/test/test_strftime.py')
-rwxr-xr-x | Lib/test/test_strftime.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/test_strftime.py b/Lib/test/test_strftime.py index 0c8f41f..e97c011 100755 --- a/Lib/test/test_strftime.py +++ b/Lib/test/test_strftime.py @@ -28,8 +28,11 @@ def strftest(now): jan1 = time.localtime(time.mktime((now[0], 1, 1) + (0,)*6)) - if now[8]: tz = time.tzname[1] - else: tz = time.tzname[0] + try: + if now[8]: tz = time.tzname[1] + else: tz = time.tzname[0] + except AttributeError: + tz = '' if now[3] > 12: clock12 = now[3] - 12 elif now[3] > 0: clock12 = now[3] @@ -66,7 +69,6 @@ def strftest(now): '%m/%d/%y %H:%M:%S'), ('%Y', '%d' % now[0], 'year with century'), ('%y', '%02d' % (now[0]%100), 'year without century'), - ('%Z', tz, 'time zone name'), ('%%', '%', 'single percent sign'), ) @@ -80,6 +82,7 @@ def strftest(now): 'year without century rendered using fieldwidth'), ('%n', '\n', 'newline character'), ('%t', '\t', 'tab character'), + ('%Z', tz, 'time zone name'), ) if verbose: |