public String getTime(String time,String type){
long timeaaron=0L;
String substring = time.replace("T", " ").substring(0, 19);
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
Date parse = format.parse(substring);
if (type.equals("1")){
timeaaron = parse.getTime()-15000;
}else{
timeaaron = parse.getTime()+15000;
}
} catch (ParseException e) {
e.printStackTrace();
}
return getDate2(timeaaron);
}
private String getDate2(long time){
String t = String.valueOf(time/1000);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.000+08:00");
String format=simpleDateFormat.format(new Date(Long.valueOf(t+"000")));
System.out.println(format);
return format;
}