From 247cbebe314d2126aec935456136d540d343735b Mon Sep 17 00:00:00 2001 From: Martin Kealey Date: Sun, 30 Jun 2024 15:57:19 +1200 Subject: [PATCH] Fix #8 Fix logic error --- tzdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tzdump.c b/tzdump.c index bdb8c2e..f3cd209 100644 --- a/tzdump.c +++ b/tzdump.c @@ -633,7 +633,7 @@ dumptzdata(char *tzval) #endif /* STRUCT_TZHEAD_TTISGMTCNT */ tmptime = tt[i].time + lti[tt[(i>0)?0:1].type].gmtoffset; - if ( lti[i].stds != 0 && lti[tt[i].type].isdst != 0 ) + if ( lti[tt[i].type].stds != 0 && lti[tt[i].type].isdst != 0 ) tmptime += lti[tt[i].type].gmtoffset - lti[tt[(i>0)?0:1].type].gmtoffset; tt[i].tm = gmtime(&tmptime);