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

Timezone is still a issue after installing patch tzupdater.jar

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 6
    • tools
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      JRE 6u3

      ADDITIONAL OS VERSION INFORMATION :
      Windows XP SP 3

      A DESCRIPTION OF THE PROBLEM :
      There was issue with Venezulan Time Zone Caracas GMT -4.30
      When used java code to get the time there is difference about 30 Minutes.
      So installed the patch KB951072 tzdata2008g but still have the same problem.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Just get the system time using the java code and time zone must be Caracas GMT -4.30


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      When executing the gettime() through java code it should display the system time.
      ACTUAL -
      Mismatch in system time to the getTime from java for about 30 minutes

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.util.Calendar;
      import java.text.SimpleDateFormat;

      public class DateUtils {
        public static final String DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss";

        public static String now() {
          Calendar cal = Calendar.getInstance();
          SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
          return sdf.format(cal.getTime());

        }

        public static void main(String arg[]) {
          System.out.println("Now : " + DateUtils.now());
        }
      }
      ---------- END SOURCE ----------

            okutsu Masayoshi Okutsu
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: