From c38605d690c3a2d23cbace2c605246f936d070e2 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期六, 26 十月 2024 11:49:15 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/DateUtils.java | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/DateUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/DateUtils.java index 9c314ca..230ce8a 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/DateUtils.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/DateUtils.java @@ -372,5 +372,16 @@ return LocalTime.parse(time, formatter); } + /** + * localdatetime转为字符串 + * + * @param time localdatetime + * @return 字符串 + */ + public static String localDateTimeToString(LocalDateTime time) { + DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + return df.format(time); + } + } -- Gitblit v1.7.1