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)); } }