long d1Ms = current_date.getTime();
long d2Ms = last_time.getTime();
long diff = Math.abs((d1Ms - d2Ms) / 60000);
System.out.println("d1MS: " + d1Ms);
System.out.println("d2MS: " + d2Ms);
System.out.println("Time difference (abs): " + diff)
我的 current_date 和 last_time 值是。
current_date: Tue Apr 24 11:07:22 IST 2012
last_time: Mon Apr 23 04:11:48 IST 2012
它显示时差:1855 但它应该小于 1440,因为持续时间小于 24 小时。为什么会这样?获得适当差异的解决方案是什么?