From 14e9e46c441de408616f5ce500623ac1d3d93b5c Mon Sep 17 00:00:00 2001 From: 罗元桥 <2376770955@qq.com> Date: 星期四, 24 六月 2021 13:55:18 +0800 Subject: [PATCH] Merge branch 'test_visit' into 'test' --- springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/DateUtils.java | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/DateUtils.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/DateUtils.java index 87c7c57..74b43ce 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/DateUtils.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/DateUtils.java @@ -127,6 +127,13 @@ } /** + * 返回当前事件的时间戳 + * @return + */ + public static Long getCurrentDateTimeStamp(){ + return LocalDateTime.now().toInstant(ZoneOffset.of("+8")).toEpochMilli(); + } + /** * 获取当前时间字符串,格式为yyyy-MM-dd HH:mm:ss * @return */ @@ -746,13 +753,10 @@ - public static void main(String[]args)throws Exception{ - isValidDate("2020/12/4"); // Date date= new Date(); // Date after = new Date(); // System.out.println(calTimeDifference(date,after)); - System.out.println(getYearMonthStart(2021,2)); } } -- Gitblit v1.7.1