Explorar o código

refactor(系统模块): 修改时间格式解析 pattern

- 将 DateTimeFormatter 的 pattern 从 "yyyy-MM-dd HH:mm:ss" 修改为 "yyyy-MM-dd HH:mm"
-此修改是为了适应仅提供到分钟级别的时间字符串解析需求
fugui001 hai 3 meses
pai
achega
bf086eab96

+ 1 - 1
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/service/impl/TournamentsServiceImpl.java

@@ -539,7 +539,7 @@ public class TournamentsServiceImpl implements ITournamentsService {
             throw new IllegalArgumentException("startTime 不能为空");
         }
 
-        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
         LocalDateTime localDateTime = LocalDateTime.parse(dateTimeStr, formatter);
         return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
     }