Java TimeUnit Usage getCurrentDateTime(int offsetMin)

Here you can find the source of getCurrentDateTime(int offsetMin)

Description

get Current Date Time

License

Apache License

Declaration

public static Date getCurrentDateTime(int offsetMin) 

Method Source Code

//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*/
}

Related

  1. getAge(Date birthday)
  2. getAge(long currentTimeMillis, long headerTimestampSec)
  3. getAllCombinations( ArrayList lengths)
  4. getAllDaysCount(final long milliseconds)
  5. getBookingDays(Calendar start, Calendar end)
  6. getCurrentTimeMillis()
  7. getCurrentTimestamp()
  8. getCurrentTimestampInSeconds()
  9. getDate(final int oceanTime)