The java.util.Date
class is based on the number of seconds since 1 January 1970 00:00 GMT. So why does this code
System.out.println(new Date(0));
print Thu Jan 01 01:00:00 GMT 1970
? My local time zone is GMT, so I expected it to print 00:00:00 GMT.