/**
* UCT格式转换成CST格式
*
* @param uct
* @return
* @throws ParseException
*/
public static Date getCST(String uct) throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat(
"EEE MMM dd HH:mm:ss 'UTC+0800' yyyy", Locale.ENGLISH);
Date date;
if (uct.length() <= 10) {
sdf = new SimpleDateFormat("yyyy-MM-dd");
}
date = sdf.parse(uct);
return date;
}
* UCT格式转换成CST格式
*
* @param uct
* @return
* @throws ParseException
*/
public static Date getCST(String uct) throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat(
"EEE MMM dd HH:mm:ss 'UTC+0800' yyyy", Locale.ENGLISH);
Date date;
if (uct.length() <= 10) {
sdf = new SimpleDateFormat("yyyy-MM-dd");
}
date = sdf.parse(uct);
return date;
}