]> andersk Git - svn-all-fast-export.git/commitdiff
Properly interpret Subversion dates as UTC.
authorAnders Kaseorg <andersk@MIT.EDU>
Sat, 3 Jan 2009 23:22:34 +0000 (18:22 -0500)
committerThiago Macieira <thiago@kde.org>
Thu, 8 Jan 2009 15:58:07 +0000 (16:58 +0100)
mktime interprets its input in the local timezone.  This can be fixed
by using timegm instead of mktime.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Thiago Macieira <thiago@kde.org>
src/svn.cpp

index 3f06af78ff6f993b9607fbdc5d947214ddd394f9..489ef141991d3fe87d3a2049f48af99a01661cd0 100644 (file)
@@ -349,7 +349,7 @@ time_t get_epoch(char *svn_date)
     memset(&tm, 0, sizeof tm);
     QByteArray date(svn_date, strlen(svn_date) - 8);
     strptime(date, "%Y-%m-%dT%H:%M:%S", &tm);
-    return mktime(&tm);
+    return timegm(&tm);
 }
 
 class SvnRevision
This page took 0.06471 seconds and 5 git commands to generate.