JDK-7091315 : javazic doesn't produce correct excluded list for Pacific/Apia (2011j)
  • Type: Bug
  • Component: tools
  • Sub-Component: updaters
  • Affected Version: tz1.3.42
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-09-16
  • Updated: 2011-09-26
  • Resolved: 2011-09-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tz1.3.42 b01Fixed
Related Reports
Relates :  
Relates :  
Description
In tzdata2011j, the offset for Pacific/Apia is changed onre than once in the future.

 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
  			-11:26:56 -	LMT	1911
  			-11:30	-	SAMT	1950		# Samoa Time
  			-11:00	-	WST	2010 Sep 26
  			-11:00	1:00	WSDT	2011 Apr 2 4:00
-			-11:00	-	WST
+			-11:00	-	WST	2011 Sep 24 3:00
+			-11:00	1:00	WSDT	2011 Dec 30
+			 13:00	1:00	WSDT	2012 Apr 1 4:00
+			 13:00	-	WST

javazic produces an incorrect table for time zones to be excluded in the per-GMT offset lists. As a result, TimeZone.getAvailableIDs(int) produces an incorrect time zone list.

This problem was fixed in 7090844. The same fix needs to go to the Tzupdater tool build system.

Comments
EVALUATION Port the JDK 8 fix to tzupdater javazic.
16-09-2011

SUGGESTED FIX The following is diff from the JDK 8 fix. The same fix is applicable to src/sun/tools/javazic/Mappings.java of tzupdater javazic. @@ -74,19 +74,20 @@ int rawOffset = zone.get(zone.size()-1).getGmtOffset(); // If the GMT offset of this Zone will change in some // future time, this Zone is added to the exclude list. boolean isExcluded = false; - if (zone.size() > 1) { - ZoneRec zrec = zone.get(zone.size()-2); + for (int i = 0; i < zone.size(); i++) { + ZoneRec zrec = zone.get(i); if ((zrec.getGmtOffset() != rawOffset) && (zrec.getUntilTime(0) > Time.getCurrentTime())) { if (excludeList == null) { excludeList = new ArrayList<String>(); } excludeList.add(zone.getName()); isExcluded = true; + break; } } if (!rawOffsetsIndex.contains(new Integer(rawOffset))) { // Find the index to insert this raw offset zones
16-09-2011