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

java.util.Date(int) constructor works wrong

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.5

      Description

      (new java.util.Date(0)).toString()
      returns "Wed Dec 31 16:00:00 PST 1969"
      instead of "Thu Jan 01 00:00:00 PST 1970"

      === Here is minimized test demonstrating the bug ===
      class java_sql_Date3 {
        public static void main (String args[]) {
          java.util.Date d=new java.util.Date(0);
          System.out.println(d);
        }
      }

      === Here is output of te test ===
      Wed Dec 31 16:00:00 PST 1969

        Attachments

          Activity

            People

            Assignee:
            duke J. Duke (Inactive)
            Reporter:
            mgorshen Mikhail Gorshenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: