For the following code:
import java.text.SimpleDateFormat;
import java.util.Date;
public class TestMain {
public static void main(String[] args) {
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
System.out.println(sdf.format(new Date(1386633600000L)));
System.out.println(sdf.format(new Date(1386633600 * 1000)));
}
}
I get the following outputs:
10-12-2013
24-12-1969
Why do they differ?