DateTime now = DateTime.now();
DateTime endTime = now.plusMinutes(1);
System.out.println(now.toString("yyyy-MM-dd HH:mm:ss"));
System.out.println(endTime.toString("yyyy-MM-dd HH:mm:ss"));
int cacheSeconds = Seconds.secondsBetween( endTime,now).getSeconds();
System.out.println(cacheSeconds);
Copy the code