From a693f2a5b8281fc1773c9ac67accbf8a850331a7 Mon Sep 17 00:00:00 2001 From: Arthur David Olson Date: Tue, 10 Oct 1995 10:27:44 -0400 Subject: [PATCH] easy change SCCS-file: localtime.c SCCS-SID: 7.45 --- localtime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/localtime.c b/localtime.c index 9c3fe70..800378e 100644 --- a/localtime.c +++ b/localtime.c @@ -1458,10 +1458,10 @@ const long offset; if (sp == NULL) return WRONG; #endif /* defined ALL_STATE */ - for (samei = 0; samei < sp->typecnt; ++samei) { + for (samei = sp->typecnt - 1; samei >= 0; --samei) { if (sp->ttis[samei].tt_isdst != tmp->tm_isdst) continue; - for (otheri = 0; otheri < sp->typecnt; ++otheri) { + for (otheri = sp->typecnt - 1; otheri >= 0; --otheri) { if (sp->ttis[otheri].tt_isdst == tmp->tm_isdst) continue; tmp->tm_sec += sp->ttis[otheri].tt_gmtoff -