/**
* 根据不同时区,转换时间
* @param time
* @return
*/
public static Date transformTime(Date date, TimeZone oldZone, TimeZone newZone) {
Date finalDate = null;
if (date != null) {
int timeOffset = oldZone.getOffset(date.getTime())
- newZone.getOffset(date.getTime());
finalDate = new Date(date.getTime() - timeOffset);
}
return finalDate;
}