Use calendar.timegm instead of time.mktime, for correct timezone handling.
authorZac Medico <zmedico@gentoo.org>
Tue, 27 Oct 2009 22:54:56 +0000 (22:54 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 27 Oct 2009 22:54:56 +0000 (22:54 -0000)
(trunk r14728)

svn path=/main/branches/2.1.7/; revision=14736

bin/repoman

index 063a778f80a015d8f1896d4205c9f1d3da1ccfe6..f6fb55b316066d9d17c8901d0b57f8f2426db612 100755 (executable)
@@ -9,6 +9,7 @@
 
 from __future__ import print_function
 
+import calendar
 import codecs
 try:
        from subprocess import getstatusoutput as subprocess_getstatusoutput
@@ -824,7 +825,7 @@ def fetch_metadata_dtd():
                        elif last_modified is not None:
                                last_modified = parsedate(last_modified)
                                if last_modified is not None:
-                                       last_modified = time.mktime(last_modified)
+                                       last_modified = calendar.timegm(last_modified)
 
                        metadata_dtd_tmp = "%s.%s" % (metadata_dtd, os.getpid())
                        try: