File.separator
public static final String separator = "" + separatorChar;
为了适应跨平台,在 UNIX 系统上,此字段的值为 '/';在 Microsoft Windows 系统上,它为 '\'。
Mysql的timestamp与datetime
储存
TIMESTAMP
1.4个字节储存(Time stamp value is stored in 4 bytes)
2.值以UTC格式保存( it stores the number of milliseconds)
3.时区转化 ,存储时对当前的时区进行转换,检索时再转换回当前的时区。
datetime
1.8个字节储存(8 bytes storage)
2.实际格式储存(Just stores what you have stored and retrieves the same thing which you have stored.)
3.与时区无关(It has nothing to deal with the TIMEZONE and Conversion.)
参考:http://lhdeyx.blog.163.com/blog/static/318196972011230113645715/
new Date()
final Date currentDate = new Date(System.currentTimeMillis());比
Date nowTime = new Date();效率高