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);
....
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);