From 296e8995d64c525ba68b54f6d0ca7d3d26134f22 Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Tue, 26 Nov 2024 16:05:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=20toZonedDateTime=20?= =?UTF-8?q?=E7=9A=84=20Deprecated=20=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/xyz/zhouxy/plusone/commons/util/DateTimeTools.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/java/xyz/zhouxy/plusone/commons/util/DateTimeTools.java b/src/main/java/xyz/zhouxy/plusone/commons/util/DateTimeTools.java index 61ece2e..d77c09d 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/util/DateTimeTools.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/util/DateTimeTools.java @@ -236,9 +236,7 @@ public class DateTimeTools { * * @param zonedDateTime {@link ZonedDateTime} 对象 * @return {@link Instant} 对象 - * @deprecated 请使用 {@link ZonedDateTime#toInstant()} 方法 */ - @Deprecated public static Instant toInstant(ZonedDateTime zonedDateTime) { // NOSONAR return zonedDateTime.toInstant(); } @@ -342,10 +340,7 @@ public class DateTimeTools { * @param localDateTime 地区时间 * @param zone 时区 * @return 带时区的地区时间 - * - * @deprecated 使用 {@link ZonedDateTime#of(LocalDateTime, ZoneId)} */ - @Deprecated public static ZonedDateTime toZonedDateTime(LocalDateTime localDateTime, ZoneId zone) { // NOSONAR return ZonedDateTime.of(localDateTime, zone); }