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

Europe/Moscow timezone show incorrect offset.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 6u43
    • core-libs

      FULL PRODUCT VERSION :
      1.6.0_22

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]


      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Local time zone is :India

      A DESCRIPTION OF THE PROBLEM :
      java version "1.6.0_22"
      Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
      Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode,sharing)

      Set clock to "(UTC+04:00) Moscow, St. Petersburg, Volgograd"
      in Date/Time Properties in Win7 operating system,
      "Automaticaly adjust clock for daylight saving changes" - unchecked.
      (I have MS Windows 2000 SP 1).

      Now my machine is having "Europe/Moscow" timezone
      According to GMT, Moscow having +4 offset.
      But when i run the code then it shows offset +3 for Moscow.

      ADDITIONAL REGRESSION INFORMATION:
      java version "1.6.0_22"
      Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
      Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode,sharing)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      First set your machine clock to "(UTC+04:00) Moscow, St. Petersburg, Volgograd" from Date/Time Properties in ControlPanel.
      Secondly check your java version , it should be 1.6
      Thirdly compile the code and execute it.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Default Time Zone ID - Europe/Moscow
      Default Time Zone Offset - (4) hour.
      ACTUAL -
      Default Time Zone ID - Europe/Moscow
      Default Time Zone Offset - (3) hour.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      No error.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      /*
       * TestMoscowTimeZone.java
       *
       * Created on November 26 2013, 17:12
       */

      import java.util.TimeZone;

      /**
       *
       * @author ankit kumar
       */
      public class TestMoscowTimeZone {
          
          /** Creates a new instance of TestDate */
          public TestMoscowTimeZone() {
          }
          
         
          public static void main(String[] args) {

          TimeZone tzone = TimeZone.getDefault();
          
          System.out.println("Default Time Zone ID - " + tzone.getID());
          System.out.println("Default Time Zone Offset - (" + tzone.getRawOffset()/60/60/1000 + ") hour.");
         
          }
          
      }
      ---------- END SOURCE ----------

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: