diff --git a/src/main/java/com/ann/demo/utils/DateUtils.java b/src/main/java/com/ann/demo/utils/DateUtils.java index bf0e0e6..a5b4195 100644 --- a/src/main/java/com/ann/demo/utils/DateUtils.java +++ b/src/main/java/com/ann/demo/utils/DateUtils.java @@ -21,7 +21,7 @@ public class DateUtils { public static String getDate() { //日期转换为字符串 LocalDateTime now = LocalDateTime.now(); - DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyyMMddhhmmss"); + DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyyMMddHHmmss"); return now.format(format); } @@ -69,7 +69,7 @@ public class DateUtils { * @return */ public static Date strToDate(String strDate) { - SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd hh:mm:ss"); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); ParsePosition pos = new ParsePosition(0); Date strtodate = formatter.parse(strDate, pos); return strtodate; diff --git a/src/main/java/com/ann/demo/utils/XMLUtils.java b/src/main/java/com/ann/demo/utils/XMLUtils.java index e8b9112..4fe0bb0 100644 --- a/src/main/java/com/ann/demo/utils/XMLUtils.java +++ b/src/main/java/com/ann/demo/utils/XMLUtils.java @@ -103,9 +103,9 @@ public class XMLUtils { handleMedicalAdvicePath = handleMedicalAdvicePathTemp; } - private static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss"); + private static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); // 病案首页独享 - private static SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy/MM/dd hh:mm:ss"); + private static SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); /** * 修改V3xml内容