获取当前时间格式化

使用hutool的工具类:
String time = DateUtil.format(new Date(), “yyyyMMddHHmmss”);
eg:20240124145517