From 1daac0aa9998b3a483966bbdf859c45e64e682a2 Mon Sep 17 00:00:00 2001
From: chenjiahe <763432473@qq.com>
Date: 星期四, 04 八月 2022 18:41:01 +0800
Subject: [PATCH] 时间计算

---
 src/main/java/com/hx/util/DateUtil.java |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/hx/util/DateUtil.java b/src/main/java/com/hx/util/DateUtil.java
index 683814c..9b18d81 100644
--- a/src/main/java/com/hx/util/DateUtil.java
+++ b/src/main/java/com/hx/util/DateUtil.java
@@ -302,6 +302,18 @@
         }
     }
 
+    /**鏃堕棿涓婄鍙犲姞
+     * @Author: ChenJiaHe
+     * @param dateTime 鏃堕棿
+     * @param second 绉�
+     * @return
+     */
+    public static Date addSecond(Date dateTime,int second){
+        Calendar c = Calendar.getInstance();
+        c.setTime(dateTime);
+        c.add(Calendar.SECOND, second);
+        return c.getTime();
+    }
 
     /**鏃堕棿涓婂垎閽熷彔鍔�
      * @Author: ChenJiaHe

--
Gitblit v1.8.0