Code

Fixed parse_timezone to correctly calculate the offset in seconds.
authorSimon Gerber <simugerber@student.ethz.ch>
Wed, 14 Apr 2010 12:02:38 +0000 (14:02 +0200)
committerJonas Fonseca <fonseca@diku.dk>
Mon, 19 Apr 2010 00:53:30 +0000 (20:53 -0400)
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tig.c

diff --git a/tig.c b/tig.c
index 47daba930c2831d267ad6665e3d0660a8027c719..05379fbc4d59bba134ad9c893b167423d02be460 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -3896,8 +3896,8 @@ parse_timezone(struct time *time, const char *zone)
 
        tz  = ('0' - zone[1]) * 60 * 60 * 10;
        tz += ('0' - zone[2]) * 60 * 60;
-       tz += ('0' - zone[3]) * 60;
-       tz += ('0' - zone[4]);
+       tz += ('0' - zone[3]) * 60 * 10;
+       tz += ('0' - zone[4]) * 60;
 
        if (zone[0] == '-')
                tz = -tz;