From 085fb26a166e972890152feeb67c1cb9090e37af Mon Sep 17 00:00:00 2001 From: Arthur David Olson Date: Tue, 5 Jun 2001 12:35:34 -0400 Subject: [PATCH] Africa/Monrovia work SCCS-file: localtime.c SCCS-SID: 7.71 --- localtime.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/localtime.c b/localtime.c index 70c358a..a3a9c10 100644 --- a/localtime.c +++ b/localtime.c @@ -1381,7 +1381,9 @@ const int do_norm_secs; } if (increment_overflow(&yourtm.tm_year, -TM_YEAR_BASE)) return WRONG; - if (yourtm.tm_year + TM_YEAR_BASE < EPOCH_YEAR) { + if (yourtm.tm_sec >= 0 && yourtm.tm_sec < SECSPERMIN) + saved_seconds = 0; + else if (yourtm.tm_year + TM_YEAR_BASE < EPOCH_YEAR) { /* ** We can't set tm_sec to 0, because that might push the ** time below the minimum representable time.