|
|
@@ -284,15 +284,12 @@ public class CheckInsPlyComeUtils {
|
|
|
}
|
|
|
|
|
|
private static String pareTimeLocalDate(String signDate) {
|
|
|
- DateTimeFormatter originalFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
+ DateTimeFormatter originalFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
DateTimeFormatter targetFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
-
|
|
|
- // 解析原始字符串日期为 LocalDate
|
|
|
- LocalDate originalDate = LocalDate.parse(signDate, originalFormatter);
|
|
|
-
|
|
|
- // 将 LocalDate 转换为 LocalDateTime,时间设为午夜
|
|
|
- LocalDateTime dateTime = originalDate.atStartOfDay();
|
|
|
- String b = dateTime.format(targetFormatter);
|
|
|
+ // 解析原始字符串日期为 LocalDateTime
|
|
|
+ LocalDateTime originalDateTime = LocalDateTime.parse(signDate, originalFormatter);
|
|
|
+ // 将 LocalDateTime 转换为目标格式的字符串
|
|
|
+ String b = originalDateTime.format(targetFormatter);
|
|
|
return b;
|
|
|
}
|
|
|
|