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

Date class does not work for dates older than 1970?

XMLWordPrintable

    • 1.1
    • sparc
    • generic
    • Not verified

      Have not had a chance to confirm the bug, but did not want to
      drop it - pavani.
      -----------------------------------------------
      From ###@###.### Wed Jan 31 03:27:15 1996
      Comments: Authenticated sender is <###@###.###>
      From: "Paul Ambrose" <###@###.###>
      To: "WebLogic Beta Information" <###@###.###>
      Date: Tue, 30 Jan 1996 22:35:43 +0000
      Subject: Problems with retrieving Dates before 1970

      Hello Everyone,

      The Java Date class does not support dates
      earlier than 1/1/70. To see this in action, try including:
      new Date(69,0,1) in your code. Amazingly, the Java docs use
      1963 in their examples!!

      Because of this, the WebLogic 1.43 release crashes when you do a
      rec.getValue("datefield").asDate()
      on a value less than 1/1/70. We have a patch that
      stops the crash and returns a null object instead.
      Values after 1/1/70 are returned without any problem.

      The good news is:
      rec.getValue("datefield").asString()
      works on any date.

      Please contact me if you want the patch. We will incorporate
      the fix in the next release.

      I have to believe that the Java group will fix the Date class soon.

      Paul

            duke J. Duke
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: