Here you can find the source of getDateByMis(long m)
public static String getDateByMis(long m)
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String getDateByMis(long m) { DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); long now = System.currentTimeMillis(); Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(now + m); return formatter.format(calendar.getTime()); }// w ww. j a v a2s.c om }