Commit 35e103e1 authored by Dyml's avatar Dyml

修改日期时间格式化

Signed-off-by: 's avatarDyml <d2yml123@163.com>
parent 39dafc01
...@@ -16,7 +16,7 @@ public class LogService { ...@@ -16,7 +16,7 @@ public class LogService {
asLog.setUserId(userId); asLog.setUserId(userId);
asLog.setContent(content); asLog.setContent(content);
// 把时间精确到秒 // 把时间精确到秒
SimpleDateFormat format2 = new SimpleDateFormat("yyyyMMdd 'T' HH:mm:ss"); SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
Date date = new Date(); Date date = new Date();
String time = format2.format(date); String time = format2.format(date);
Date date2 = format2.parse(time); Date date2 = format2.parse(time);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment