JAVA设置SimpleDateFormat函数时区

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
String strNow = sdf.format(new Date());
原文地址:https://www.cnblogs.com/wangpei/p/3277055.html