Merge branch 'feature' of https://gitee.com/liuyingfang/cashier-admin into feature
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.*;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Date;
|
||||
@@ -117,6 +118,18 @@ public class DateUtil {
|
||||
return DFY_MD_HMS.format(localDateTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* 日期格式化 yyyy-MM-dd HH:mm:ss
|
||||
*
|
||||
* @param timeStamp /
|
||||
* @return /
|
||||
*/
|
||||
public static String timeStampFormatyMdHms(long timeStamp) {
|
||||
Date date = new Date(timeStamp);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
return sdf.format(date);
|
||||
}
|
||||
|
||||
/**
|
||||
* 日期格式化 yyyy-MM-dd
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user