Here you can find the source of getTime(int minuteDelt)
public static long getTime(int minuteDelt)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getTime(String format, int minuteDelt) { Date nowTime = new Date(); nowTime.setTime(nowTime.getTime() + minuteDelt * 60000); SimpleDateFormat time = new SimpleDateFormat(format); return time.format(nowTime); }/* ww w.j av a 2 s .c o m*/ public static long getTime(int minuteDelt) { return (new Date().getTime() + minuteDelt * 60000) / 1000; } }