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

java.sql.Timestamp needs clarification about toString() behavior

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 9
    • core-libs
    • None

      The current specification for java.sql.Timestamp.toString() states the following:
      ....
      Returns:
      a String object in yyyy-mm-dd hh:mm:ss.fffffffff format
      ....
      But the method's behavior is undefined in case the year exceeds the 4-digit value. This can be achieved by constructing Timestamp object with the following:
      new Timestamp(Long.MAX_VALUE);

            lancea Lance Andersen
            kfertikov Kirill Fertikov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: