>From 1e01ec066d5b5a169d58efb2f2dadf6acd1b2321 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 1 Nov 2018 10:23:33 -0700
Subject: [PROPOSED 1/2] Fix appended dummy transition in non-POSIX zones
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* zic.c (outzone): When adding a redundant transition to indicate
definite knowledge of a lack of transitions in a zone whose
predicted future cannot be represented in a POSIX TZ string, the
transition���s type should be the same as the previous transition;
it should not be the maximum type value.  The distinction matters
in the upcoming Africa/Casablanca zone; without this patch, zic
would generate an incorrect year-2440 transition for the zone,
where 2440 = 2037 + 400 + 3.
---
 zic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zic.c b/zic.c
index cb1bf28..fb0fc04 100644
--- a/zic.c
+++ b/zic.c
@@ -2741,7 +2741,7 @@ error(_("can't determine time zone abbreviation to use just after until time"));
 			if (attypes[i].at > lastat->at)
 				lastat = &attypes[i];
 		if (lastat->at < rpytime(&xr, max_year - 1)) {
-			addtt(rpytime(&xr, max_year + 1), typecnt-1);
+			addtt(rpytime(&xr, max_year + 1), lastat->type);
 			attypes[timecnt - 1].dontmerge = true;
 		}
 	}
-- 
2.19.1

