/** 参数 time *return string */ public static String longToDateStr(long time){ Date date = new Date(time); SimpleDateFormat sd = new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss”); return sd.format(date); }