现在 所用Java版本,Date类构造方法Date(0)的时间不是Thu Jan 01 01:00:00 GMT 1970了,而是Thu Jan 01 08:00:00 CST 1970。( 1970 年1 月1 日8时0分0秒 星期4)
为什么 Date b1=new Date(623289600000); 不可以,下面的却可以呢?
long a=623289600000L;
Date b1=new Date(a); 要在长数字后面加个L才行
现在 所用Java版本,Date类构造方法Date(0)的时间不是Thu Jan 01 01:00:00 GMT 1970了,而是Thu Jan 01 08:00:00 CST 1970。( 1970 年1 月1 日8时0分0秒 星期4)
为什么 Date b1=new Date(623289600000); 不可以,下面的却可以呢?
long a=623289600000L;
Date b1=new Date(a); 要在长数字后面加个L才行