时间戳服务

This commit is contained in:
zhangqinbin
2021-04-09 09:15:55 +08:00
parent a7f8afb2e5
commit 2fa4497eeb
2 changed files with 6 additions and 3 deletions

View File

@ -156,7 +156,8 @@ public class TimeServiceConstant {
.setDate(date.getDate())
.setHour(date.getHours())
.setMinute(date.getMinutes())
.setSecond(date.getSeconds());
.setSecond(date.getSeconds())
.setTimestamp(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date));
return systemTime;
}catch (Exception e){
log.error("获取时间戳异常", e);

View File

@ -11,8 +11,10 @@ import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class SystemTime {
/**
* 时间
*/
private String timestamp;
/**
* 年
*/