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

(tz) Incorrect default timezone for Santiago, Chile on Win32.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.4.1
    • Fix Version/s: 5.0
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b28
    • CPU:
      x86
    • OS:
      windows_xp

      Backports

        Description

        Name: nt126004 Date: 01/14/2003


        FULL PRODUCT VERSION :
        java version "1.4.1_01"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
        Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)

        FULL OPERATING SYSTEM VERSION :

        Microsoft Windows XP [Version 5.1.2600]

        ADDITIONAL OPERATING SYSTEMS :

        Windows 2000, perhaps other Win32 as well.


        A DESCRIPTION OF THE PROBLEM :
        If the Windows timezone is set to "Santiago", with a GMT
        offset of -4, the JRE uses a default timezone of
        "America/Caracas", when it should be using
        "America/Santiago". Both time zones have a -4 offset, but
        they have different daylight savings rules.

        As a result, Java apps appear to be an hour behind during
        summer in Chile.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        1. Set Windows timezone to Santiago, GMT -4.
        2. Run the attached code.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        Actual results:

        default timezone = America/Caracas
        correct timezone = America/Santiago
        Time with default timezone = 16/12/02 00:00
        Time with correct timezone = 16/12/02 01:00

        Expected results:

        default timezone = America/Santiago
        correct timezone = America/Santiago
        Time with default timezone = 16/12/02 00:00
        Time with correct timezone = 16/12/02 00:00


        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------

        import java.util.TimeZone;
        import java.util.Calendar;
        import java.util.Date;
        import java.text.DateFormat;

        public class TZTest
        {

        public static void main(String[] argv)
        {

        TimeZone defaultTZ = TimeZone.getDefault();
        System.out.println("default timezone = " + defaultTZ.getID());
        TimeZone correctTZ = TimeZone.getTimeZone("America/Santiago");
        System.out.println("correct timezone = " + correctTZ.getID());
        Calendar calendar = Calendar.getInstance();
        calendar.set(2002, 11, 16, 0, 0);
        Date date = calendar.getTime();
        DateFormat df = DateFormat.getInstance();
        System.out.println("Time with default timezone = " + df.format(date));
        df.setTimeZone(correctTZ);
        System.out.println("Time with correct timezone = " + df.format(date));
        }
        }
        ---------- END SOURCE ----------

        CUSTOMER WORKAROUND :
        Manually set the timezone to the correct value.
        (Review ID: 179188)
        ======================================================================

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                okutsu Masayoshi Okutsu
                Reporter:
                nthompsosunw Nathanael Thompson (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: