JDK-6695191 : The Sri Lanka Time zone is being calculated incorrectly as of JDK 1.5.0_14.(Was correct in 1.5.0_13)
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 5.0u14
  • Priority: P2
  • Status: Closed
  • Resolution: Not an Issue
  • OS: solaris_7
  • CPU: sparc
  • Submitted: 2008-04-29
  • Updated: 2010-04-03
  • Resolved: 2008-05-13
Related Reports
Relates :  
Description
The Sri Lanka Time zone is being calculated incorrectly as of JDK 1.5.0_14.  (Was correct in 1.5.0_13)

Test Case :
import java.util.*;

public class SriLanka {
    static public void main(String[] args) {
        final String id = "Asia/Colombo";

        System.out.println("    time zone ID: " + id);
        System.out.println("expected results: Sri Lanka Time");
        System.out.println("  actual results: " +
            TimeZone.getTimeZone(id).getDisplayName(Locale.US));
    }
}

Result with 1.5.0_13 :
jdk1.5.0_13/bin/java SriLanka
    time zone ID: Asia/Colombo
expected results: Sri Lanka Time
  actual results: Sri Lanka Time


Result with 1.5.0_14 :
jdk1.5.0_14/bin/java SriLanka
    time zone ID: Asia/Colombo
expected results: Sri Lanka Time
  actual results: India Standard Time

Sri Lanka returns "India Standard Time" when it should actually return "Sri Lanka Time"

The change between 150_13 and _14 which caused this is in DateFormatZoneData.java:

   485  <             {"Asia/Colombo", new String[] {"Sri Lanka Time", "LKT",
   486  <                                            "Sri Lanka Summer Time", "LKST"}},
   487  >             {"Asia/Colombo", IST},

Comments
EVALUATION Licensee Agrees with the evaluation and requests to close the issue.
13-05-2008

EVALUATION When Sri Lanka went back to +0530 in 2006, its abbreviation went back to IST as well in the Olson time zone database. Java followed that change in its display names. Looks like Olson database has a convention to use the same time zone abbreviation for the same GMT offset. For example, Asia/Colombo has the following history (in Olson time zone data). # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Colombo 5:19:24 - LMT 1880 5:19:32 - MMT 1906 # Moratuwa Mean Time 5:30 - IST 1942 Jan 5 5:30 0:30 IHST 1942 Sep 5:30 1:00 IST 1945 Oct 16 2:00 5:30 - IST 1996 May 25 0:00 6:30 - LKT 1996 Oct 26 0:30 6:00 - LKT 2006 Apr 15 0:30 5:30 - IST "IST" is consistently used for +0530. Is this a serious business issue?
30-04-2008