为什么 getTime() 有错误?我已经尝试了一切,但无法弄清楚问题所在。据我所知,我已将 String arrayOpportunity[2] 转换为日期。(它最初是一个字符串。)谢谢!
SimpleDateFormat df = new SimpleDateFormat();
df.applyPattern("yyyy-MM-dd HH:mm:ss");
// Calendar timestamp = Calendar.getInstance();
// timestamp.setTime(df.parse(arrayOpportunity2)[0]);
arraySuspects.add(arrayGPS[0]);
// }
// long timediff = coord2.getTimestamp().getTimeInMillis() -
// coord1.getTimestamp().getTimeInMilis();
Date convertedDate = df.parse(arrayOpportunity[2]);
Date duration = df.parse("0000-00-00 00:14:59");
Date lastTime = df.parse(arrayOpportunity[2]);
// SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/mm/dd");
System.out.println(arrayOpportunity[2]);
// arrayOpportunity[2].setTime(arrayOpportunity[2].getTime() + duration);
// lastTime += duration;
arrayOpportunity[2].setTime(arrayOpportunity[2].getTime() + (((14 * 60) + 59)* 1000));