//UTC时间转换
public static String UTCToCommon(String dateString,String pattern) {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"); //yyyy-MM-dd'T'HH:mm:ss.SSSZ
Date date = null;
if (dateString == null) {
return null;
} else {
try {
date = df.parse(dateString);
SimpleDateFormat df1 = new SimpleDateFormat ("EEE MMM dd HH:mm:ss Z yyyy", Locale.UK);
Date date1 = df1.parse(date.toString());
DateFormat df2 = new SimpleDateFormat(pattern);
String time = df2.format(date1);
return time;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
}