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

java.sql.Timestamp(long) constructor works wrong

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.1
    • CPU:
      sparc
    • OS:
      solaris_2.5
    • Verification:
      Not verified

      Description

      === Here is the test demonstrating the bug ===
      class java_sql_Timestamp5 {
        public static void main (String args[]) {
          long time=System.currentTimeMillis(); // today is Oct 22, 1996
          System.out.println("Date = " + new java.util.Date(time));
          System.out.println("Timestamp = " + new java.sql.Timestamp(time));
          // will print incorrect time
        }
      }
      === Here is the output of the test ===
      Date = Tue Oct 22 12:37:08 PDT 1996
      Timestamp = 1970-01-10 11:00:13.717

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mhapnersunw Mark Hapner (Inactive)
              Reporter:
              mgorshen Mikhail Gorshenev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: