diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/DateUtil.java b/poi/src/main/java/org/apache/poi/ss/usermodel/DateUtil.java index 7a50951ac7..154127a50c 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/DateUtil.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/DateUtil.java @@ -93,7 +93,7 @@ public class DateUtil { */ public static LocalDateTime toLocalDateTime(Date date) { return date.toInstant() - .atZone(TimeZone.getTimeZone(ZoneOffset.UTC).toZoneId()) // java.util.Date uses UTC + .atZone(LocaleUtil.TIMEZONE_UTC.toZoneId()) // java.util.Date uses UTC .toLocalDateTime(); } @@ -104,7 +104,7 @@ public class DateUtil { */ public static LocalDateTime toLocalDateTime(Calendar date) { return date.toInstant() - .atZone(TimeZone.getTimeZone(ZoneOffset.UTC).toZoneId()) // java.util.Date uses UTC + .atZone(LocaleUtil.TIMEZONE_UTC.toZoneId()) // java.util.Date uses UTC .toLocalDateTime(); }