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

java.sql.Timestamp.toString method contains incorrect javadoc

XMLWordPrintable

    • b86
    • x86
    • windows_nt
    • Verified

      Name: rmT116609 Date: 11/19/2003


      A DESCRIPTION OF THE PROBLEM :
      The toString method of the java.sql.Timestamp class states
      the output String to be yyyy-mm-dd hh:mm:ss.fffffffff

      The date part of the format should be yyyy-MM-dd, and the
      note states to use "yyyy.MM.dd" rather than "yyy-mm-dd."

      The inability of SimpleDateFormat to support nanoseconds
      should also be stated in java.text.SimpleDateFormat.

      The format is stated incorrectly in other parts of the API
      docs

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Timestamp.html#toString()

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      The API docs should state the correct SimpleDateFormat format

      (Incident Review ID: 180737)
      ======================================================================

            lancea Lance Andersen
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: