Merge branch 'sb/pack-protocol-doc-nak' into maint
[gitweb.git] / date.c
diff --git a/date.c b/date.c
index 7c9f76998ac7a00fb5f8781dd8e460f899edbfac..4c7aa9ba853c0924d49f4b8c2cc06826fe08956c 100644 (file)
--- a/date.c
+++ b/date.c
@@ -74,6 +74,8 @@ static int local_tzoffset(unsigned long time)
        localtime_r(&t, &tm);
        t_local = tm_to_time_t(&tm);
 
+       if (t_local == -1)
+               return 0; /* error; just use +0000 */
        if (t_local < t) {
                eastwest = -1;
                offset = t - t_local;