public class TestJar {
public static void main(String args[]) throws ParseException {
UTCToCST("2019-03-19T07:22:07", "yyyy-MM-dd'T'HH:mm:ss");
}
public static void UTCToCST(String UTCStr, String format) throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
sdf.setTimeZone(TimeZone.getTimeZone("GMT+:08:00"));
System.out.println("北京时间: " + sdf.parse(UTCStr).getTime());
}
}