diff babel/messages/catalog.py @ 123:5b4f302abf53

Fix parsing of timezone in POT creation date.
author cmlenz
date Fri, 15 Jun 2007 22:58:46 +0000
parents 03f106700f02
children 9d58665d134c
line wrap: on
line diff
--- a/babel/messages/catalog.py
+++ b/babel/messages/catalog.py
@@ -258,7 +258,8 @@
                 ts = time.mktime(tt)
                 tzoffset = FixedOffsetTimezone(int(tzoffset[:2]) * 60 +
                                                int(tzoffset[2:]))
-                self.creation_date = datetime.fromtimestamp(ts, tzoffset)
+                dt = datetime.fromtimestamp(ts)
+                self.creation_date = dt.replace(tzinfo=tzoffset)
 
     mime_headers = property(_get_mime_headers, _set_mime_headers, doc="""\
     The MIME headers of the catalog, used for the special ``msgid ""`` entry.
Copyright (C) 2012-2017 Edgewall Software