Module Name:    src
Committed By:   christos
Date:           Fri Oct 28 21:51:06 UTC 2011

Modified Files:
        src/lib/libc/time: localtime.c

Log Message:
Only advance the time if we are skipping the gap.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/lib/libc/time/localtime.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/time/localtime.c
diff -u src/lib/libc/time/localtime.c:1.61 src/lib/libc/time/localtime.c:1.62
--- src/lib/libc/time/localtime.c:1.61	Fri Oct 28 09:53:06 2011
+++ src/lib/libc/time/localtime.c	Fri Oct 28 17:51:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: localtime.c,v 1.61 2011/10/28 13:53:06 christos Exp $	*/
+/*	$NetBSD: localtime.c,v 1.62 2011/10/28 21:51:06 christos Exp $	*/
 
 /*
 ** This file is in the public domain, so clarified as of
@@ -10,7 +10,7 @@
 #if 0
 static char	elsieid[] = "@(#)localtime.c	8.17";
 #else
-__RCSID("$NetBSD: localtime.c,v 1.61 2011/10/28 13:53:06 christos Exp $");
+__RCSID("$NetBSD: localtime.c,v 1.62 2011/10/28 21:51:06 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -1934,7 +1934,9 @@ time2sub(const timezone_t sp, struct tm 
 						break;
 				}
 				if (off) {
-					t = hi + off;
+					t = hi;
+					if (off > 0)
+						t += off;
 					break;
 				}
 			}

Reply via email to