My problem is pretty straigtforward explained :
if i do this :
public class Main {
public static void main(String[] args) throws Exception {
Date d = new Date(0L );
System.out.println(d);
}
}
I get the following output : Thu Jan 01 01:00:00 CET 1970
According to the doc, i was expecting : Thu Jan 01 00:00:00 CET 1970
I would like was going wrong...
EDIT : Indeed, i read the doc too fast. I sould have Thu Jan 01 00:00:00 GMT 1970
So, how can i force the use of GMT, and ignore all local time ?
Edit, Solution :
public static void main(String[] args) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("H:m:s:S");
SimpleTimeZone tz = new SimpleTimeZone(0,"ID");
sdf.setTimeZone(tz) ;
Date d = new Date(0L );
System.out.println( sdf.format(d));
}