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

(cal) BUG in Calendar

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 6
    • core-libs

      FULL PRODUCT VERSION :


      ADDITIONAL OS VERSION INFORMATION :
      Linux/Ubuntu 8.10 - released in October 2008.


      A DESCRIPTION OF THE PROBLEM :
      For this date Sat Oct 16 00:00:00 BRT 3910 when I make the

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile the code of the description field and run it.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      dateValue.getTime() = Sat Oct 16 00:00:00 BRT 3910


      ACTUAL -
      dateValue.getTime()Sat Oct 15 23:00:00 BRT 3910


      Just for this date has the problem.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.util.Calendar;
      import java.util.Date;

      public class bugReport{
      public static void main(String [ ] args)
      {

      Calendar dateValue = Calendar.getInstance();

      dateValue.set(3910,
      10 - 1, //October
      16,
      0,
      0,
      0);

      System.out.println("dateValue" + dateValue);
      System.out.println("dateValue.getTime()" + dateValue.getTime());
      System.out.println("dateValue.getTimeInMillis()" + dateValue.getTimeInMillis());

      }
      }
      ---------- END SOURCE ----------

      SUPPORT :
      YES

            okutsu Masayoshi Okutsu
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: