Name: sgC58550 Date: 06/20/97
The code:
java.util.Date dt1 = new Date();
System.out.println(dt1+"\n");
System.out.println(dt1.toString()+"\n");
System.out.println((new java.util.Date(dt1.toString()))+"\n");
The results:
Fri Apr 18 10:02:39 EDT 1997
Fri Apr 18 10:02:39 EDT 1997
Fri Apr 18 09:02:39 EDT 1997
There is one hour difference when you convert date into string and convert string back to date.
I developed an encrpytion algorithm based on string encryption/decrpytion and work on encrpyt/decrpyt
most java's data types. I found the above problem.
company - TransQuest Inc , email - ###@###.###
======================================================================
- duplicates
-
JDK-4083167 Date is wrong after transitioning from PDT to PST
-
- Closed
-