- 
    Bug 
- 
    Resolution: Fixed
- 
     P4 P4
- 
    1.1
- 
        1.1beta3
- 
        sparc
- 
        solaris_2.5
- 
        Not verified
                    Seconds value may be incorrect:
===== Here is the minimized test =====
import java.sql.Timestamp;
class java_sql_Timestamp1 {
public static void main (String args[]) {
Timestamp t=new Timestamp(-1800);
System.out.println("t = " + t.toString());
System.out.println("t = " + t.toGMTString()); //should print
// "t = 31 Dec 1969 23:59:58 GMT"
System.out.println("t.getTime() = " + t.getTime()); //should print
// "-2000"
}
}
===== Here is the output of the test =====
t = 1969-12-31 15:59:58.2
t = 31 Dec 1969 23:59:59 GMT
t.getTime() = -1001
            
===== Here is the minimized test =====
import java.sql.Timestamp;
class java_sql_Timestamp1 {
public static void main (String args[]) {
Timestamp t=new Timestamp(-1800);
System.out.println("t = " + t.toString());
System.out.println("t = " + t.toGMTString()); //should print
// "t = 31 Dec 1969 23:59:58 GMT"
System.out.println("t.getTime() = " + t.getTime()); //should print
// "-2000"
}
}
===== Here is the output of the test =====
t = 1969-12-31 15:59:58.2
t = 31 Dec 1969 23:59:59 GMT
t.getTime() = -1001
- relates to
- 
                    JDK-4010647 java.sql.Timestamp(long) constructor works wrong -           
- Closed
 
-