Uploaded image for project: 'JDK'
  1. JDK
  2. 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)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Not an Issue
    • Affects Version/s: 5.0u14
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      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},

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              kevibrow Kevin Brown
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: