Date: Tue, 14 May 96 14:31:50 EDT From: ado@elsie.nci.nih.gov (Arthur David Olson) I lean toward the second approach; are there any better ideas out there? How about the following implementation of the 2nd approach instead? It's the same basic idea, except that the two transitions are merged if their before-transition localtimes are the same (or if the latter precedes the former!). This should avoid the horridness of the 1-hour special case. This patch fixes bugs in the following transitions: 1919-03-01 Europe/Brussels 1973-04-29 America/Menominee 1983-10-30 America/Juneau 1985-04-19 Asia/Istanbul 1985-09-15 Atlantic/Stanley =================================================================== RCS file: RCS/zic.c,v retrieving revision 1996.6 retrieving revision 1996.6.1.2 diff -c -r1996.6 -r1996.6.1.2 *** zic.c 1996/05/03 02:49:23 1996.6 --- zic.c 1996/05/15 07:51:50 1996.6.1.2 *************** *** 1397,1406 **** if (isdsts[0] == 0) while (attypes[fromi].type == 0) ++fromi; /* handled by default rule */ ! for ( ; fromi < timecnt; ++fromi) if (toi == 0 || attypes[toi - 1].type != attypes[fromi].type) attypes[toi++] = attypes[fromi]; timecnt = toi; } /* --- 1397,1416 ---- if (isdsts[0] == 0) while (attypes[fromi].type == 0) ++fromi; /* handled by default rule */ ! for ( ; fromi < timecnt; ++fromi) { ! if (toi != 0 ! && ((attypes[fromi].at ! + gmtoffs[attypes[toi - 1].type]) ! <= (attypes[toi - 1].at ! + gmtoffs[toi == 1 ? 0 ! : attypes[toi - 2].type]))) { ! attypes[toi - 1].type = attypes[fromi].type; ! continue; ! } if (toi == 0 || attypes[toi - 1].type != attypes[fromi].type) attypes[toi++] = attypes[fromi]; + } timecnt = toi; } /*