I have very strange behaviour of Java Date class:
System.out.println(new Date().toGMTString());
long l = 1332452310L;
Date d = new Date(l);
System.out.println(d.toGMTString());
Gives me
22 Mar 2012 22:00:42 GMT
16 Jan 1970 10:07:32 GMT
Why this happens?
your long l is the time in seconds, you need to make it the time in milliseconds: