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

Win32: Locale of en_IE & tz=GMT results in default timezone equivalent to IST

XMLWordPrintable

      Reproduce as follows:
      1. Set locale to en_IE on Windows 2000:
        * Windows Control Panel, Regional Options, Your locale -> "English (Ireland)"
      2. Set timezone to GMT (Dublin, London)
        * Windows Control Panel, Date/Time -> (Dublin, London, ..)

      Sample code:
            DateFormat df = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);
              String s = df.format(new Date());
              System.out.println("Default timezone is " + TimeZone.getDefault());
              System.out.println("Default date format for locale " + Locale.getDefault() + " is " + s);


      Sample output at 21.27 BST is:

      Default timezone is sun.util.calendar.ZoneInfo[id="Europe/London",offset=0,dstSavings=3600000,useDaylight=true,
      transitions=242,lastRule=java.util.SimpleTimeZone[id=Europe/London,offset=0,dstSavings=3600000,useDaylight=true
      ,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,
      endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]]
      Default date format for locale en_IE is 06 June 2003 21:27:55 o'clock IST

            kcolfersunw Kieran Colfer (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: