summaryrefslogtreecommitdiff
path: root/gen_tests.py
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2005-05-10 20:56:54 +0000
committerArch Librarian <arch@canonical.com>2005-05-10 20:56:54 +0000
commita6940cfb164830f69bfcd919bc33ec9141d4d371 (patch)
treef4f8d6a0dde8054e0d857e7aeb93db6c3078fe66 /gen_tests.py
parenta9b69e38533a4a7c16d14b59fbe8864b9c003871 (diff)
downloadpytz-a6940cfb164830f69bfcd919bc33ec9141d4d371.tar.gz
Need to round utcoffset() and dst() to keep strftime happy
Author: zenzen Date: 2004-06-03 03:04:10 GMT Need to round utcoffset() and dst() to keep strftime happy
Diffstat (limited to 'gen_tests.py')
-rw-r--r--gen_tests.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/gen_tests.py b/gen_tests.py
index bb03907..2532f0b 100644
--- a/gen_tests.py
+++ b/gen_tests.py
@@ -1,11 +1,11 @@
#!/usr/bin/env python
# -*- coding: ascii -*-
'''
-$Id: gen_tests.py,v 1.7 2004/06/03 02:47:19 zenzen Exp $
+$Id: gen_tests.py,v 1.8 2004/06/03 03:04:10 zenzen Exp $
'''
-__rcs_id__ = '$Id: gen_tests.py,v 1.7 2004/06/03 02:47:19 zenzen Exp $'
-__version__ = '$Revision: 1.7 $'[11:-2]
+__rcs_id__ = '$Id: gen_tests.py,v 1.8 2004/06/03 03:04:10 zenzen Exp $'
+__version__ = '$Revision: 1.8 $'[11:-2]
import os, os.path, popen2, re, sys
from gen_tzinfo import allzones
@@ -94,6 +94,8 @@ def aszone(utc_string, zone):
utc_t = strptime(utc_string, '%a %b %d %H:%M:%S %Y UTC')[:6] + (0, utc_tz)
utc_datetime = datetime(*utc_t)
loc_datetime = utc_datetime.astimezone(loc_tz)
+ # Make sure tzinfo.utcoffset() works as wanted
+ '%s' % (loc_datetime.strftime('%a %b %d %H:%M:%S %Y %z'))
return '%s' % (loc_datetime.strftime('%a %b %d %H:%M:%S %Y %Z'))
def _test():