The code is below:
DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); String logTime = format.format(new Date((format.parse("2013-6-30").getTime()+25*24*3600*1000))); String logTime1 = format.format(new Date((format.parse("2013-6-30").getTime()+24*24*3600*1000))); System.out.println("logTime: "+logTime); System.out.println("logTime1: "+logTime1); This is the output:
logTime: 2013-06-05 logTime1: 2013-07-24 What is wrong here?
