From 58d2eb3e4e2c2bd04d6dd67a80a6b2d32e0ef027 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sat, 3 Jan 2009 18:22:34 -0500 Subject: [PATCH] Properly interpret Subversion dates as UTC. mktime interprets its input in the local timezone. This can be fixed by using timegm instead of mktime. Signed-off-by: Anders Kaseorg Signed-off-by: Thiago Macieira --- src/svn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/svn.cpp b/src/svn.cpp index 3f06af7..489ef14 100644 --- a/src/svn.cpp +++ b/src/svn.cpp @@ -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 -- 2.11.4.GIT