diff --git a/icu4c/source/tools/tzcode/localtime.c b/icu4c/source/tools/tzcode/localtime.c index 06a93c93eea..1fdfbdbb312 100644 --- a/icu4c/source/tools/tzcode/localtime.c +++ b/icu4c/source/tools/tzcode/localtime.c @@ -5,7 +5,7 @@ #ifndef lint #ifndef NOID -static char elsieid[] = "@(#)localtime.c 8.3"; +static char elsieid[] = "@(#)localtime.c 8.5"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -556,9 +556,9 @@ register const int doextend; } i = 2 * YEARSPERREPEAT; sp->goback = sp->goahead = sp->timecnt > i; - sp->goback &= sp->types[i] == sp->types[0] && + sp->goback = sp->goback && sp->types[i] == sp->types[0] && differ_by_repeat(sp->ats[i], sp->ats[0]); - sp->goahead &= + sp->goahead = sp->goahead && sp->types[sp->timecnt - 1] == sp->types[sp->timecnt - 1 - i] && differ_by_repeat(sp->ats[sp->timecnt - 1], sp->ats[sp->timecnt - 1 - i]); @@ -916,7 +916,6 @@ const int lastditch; load_result = tzload(TZDEFRULES, sp, FALSE); if (load_result != 0) sp->leapcnt = 0; /* so, we're off a little */ - sp->timecnt = 0; if (*name != '\0') { if (*name == '<') { dstname = ++name; @@ -967,6 +966,7 @@ const int lastditch; atp = sp->ats; typep = sp->types; janfirst = 0; + sp->timecnt = 0; for (year = EPOCH_YEAR; sp->timecnt + 2 <= TZ_MAX_TIMES; ++year) { diff --git a/icu4c/source/tools/tzcode/readme.txt b/icu4c/source/tools/tzcode/readme.txt index c6b09e09e57..656a64887bf 100644 --- a/icu4c/source/tools/tzcode/readme.txt +++ b/icu4c/source/tools/tzcode/readme.txt @@ -8,6 +8,8 @@ ********************************************************************** Note: this directory currently contains tzcode as of tzcode2006h.tar.gz + with localtime.c patches from tzcode2006i.tar.gz + ---------------------------------------------------------------------- OVERVIEW