// fromTime 原始时区 // toTime 需要转换到的时区 public static Date getGMTTime(Date retdate, String fromTime, String toTime){ Calendar cal = Calendar.getInstance(); cal.setTimeZone(TimeZone.getTimeZone(toTime)); cal.setTime(retdate); Calendar date = Calendar.getInstance(); date.setTimeZone(TimeZone.getTimeZone(fromTime)); date.set(Calendar.MILLISECOND, cal.get(Calendar.MILLISECOND)); date.set(cal.get(Calendar.YEAR),cal.get(Calendar.MONTH),cal.get(Calendar.DAY_OF_MONTH),cal.get(Calendar.HOUR_OF_DAY),cal.get(Calendar.MINUTE),cal.get(Calendar.SECOND)); return date.getTime(); }