SimpleDateFormat format =new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.ENGLISH);
format.setTimeZone(TimeZone.getTimeZone("GMT+05:30"));
try {
long diff2=format.parse(accidentReports.getAccidentDate());
}
Run Code Online (Sandbox Code Playgroud)
获取此输出 :: Thu Dec 17 15:37:43 GMT+05:30 5
android ×1