Here you can find the source of getCurrentDateTime(int offsetMin)
public static Date getCurrentDateTime(int offsetMin)
//package com.java2s; //License from project: Apache License import java.util.Date; import java.util.concurrent.TimeUnit; public class Main { public static Date getCurrentDateTime(int offsetMin) { return new Date(System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(offsetMin)); }/* www . j av a 2 s . com*/ }