From 64264bb278bbfaa8df29f5f19a59d4e8345b04aa Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期二, 01 七月 2025 09:59:41 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/2.0' into 2.0 --- 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 dee9fc5..71ea2c8 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 @@ -222,4 +222,15 @@ } return sb.toString(); } + + public static Date getTodayStartTime() { + // 获取今天的日期 + LocalDate today = LocalDate.now(); + + // 获取当天的开始时间(00:00:00) + LocalDateTime startOfDay = today.atStartOfDay(); + + // 转换为 Date 类型 + return Date.from(startOfDay.atZone(ZoneId.systemDefault()).toInstant()); + } } -- Gitblit v1.7.1