Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6610747

(tz) Australian time zone abbr given by SimpleDateFormat are different

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Withdrawn
    • Icon: P4 P4
    • None
    • 1.4.2
    • core-libs

      A DESCRIPTION OF THE REQUEST :
      The Australian time zone abbreviations given by Simple Date Format are different from the official time zone abbreviations as given in the Australian government website:
      http://www.australia.gov.au/about-australia-13time

      I ran this code:
      import java.text.SimpleDateFormat;
      public class AllTzIds {
          public static void main(String[] args) {
              SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yy hh:mm a z");
              String[][] arr = sdf.getDateFormatSymbols().getZoneStrings();
              for (int i = 0; i < arr.length; i++) {
                  String [] arr1 = arr[i];
                  for(int j=0;j<arr1.length;j++){
                      System.out.print(arr1[j]+" ");
                  }
                  System.out.println();
              }
          }
      }

      A part of the output (only showing timezones in Australia):

       Australia/ACT Eastern Standard Time (New South Wales) EST
       Australia/Adelaide Central Standard Time (South Australia) CST
       Australia/Brisbane Eastern Standard Time (Queensland) EST
       Australia/Broken_Hill Central Standard Time (South Australia/New South Wales) CST
       Australia/Canberra Eastern Standard Time (New South Wales) EST
       Australia/Darwin Central Standard Time (Northern Territory) CST
       Australia/Hobart Eastern Standard Time (Tasmania) EST
       Australia/LHI Load Howe Standard Time LHST
       Australia/Lindeman Eastern Standard Time (Queensland) EST
       Australia/Lord_Howe Load Howe Standard Time LHST
       Australia/Melbourne Eastern Standard Time (Victoria) EST
       Australia/North Central Standard Time (Northern Territory) CST
       Australia/NSW Eastern Standard Time (New South Wales) EST
       Australia/Perth Western Standard Time (Australia) WST
       Australia/Queensland Eastern Standard Time (Queensland) EST
       Australia/South Central Standard Time (South Australia) CST
       Australia/Sydney Eastern Standard Time (New South Wales) EST
       Australia/Tasmania Eastern Standard Time (Tasmania) EST
       Australia/Victoria Eastern Standard Time (Victoria) EST
       Australia/West Western Standard Time (Australia) WST
       Australia/Yancowinna Central Standard Time (South Australia/New South Wales) CST

      These are not in synch with the time zone names ascribed to these regions in the Australian government website link given above.
      Ex, South Australia's timezone should be returned as ACST, as apposed to CST that is returned by SimpleDateFormat.

      JUSTIFICATION :
      Making the time zone names unique across the world will make the time zone identification unambiguous.

            okutsu Masayoshi Okutsu
            peytoia Yuka Kamiya (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: