Here you can find the source of getAfterSecond(Timestamp currentDate)
public static Timestamp getAfterSecond(Timestamp currentDate)
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; import java.util.Calendar; public class Main { public static Timestamp getAfterSecond(Timestamp currentDate) { Calendar calender = Calendar.getInstance(); calender.setTime(currentDate);/*w ww . j a va 2 s . co m*/ calender.add(Calendar.SECOND, 1); return new Timestamp(calender.getTimeInMillis()); } }