diff options
author | PJ Fanning <fanningpj@apache.org> | 2022-02-16 10:19:54 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2022-02-16 10:19:54 +0000 |
commit | 3f3d194689a21a81325240a3810e3dc6956bb81c (patch) | |
tree | 9991ab5f0e0acb12ecf7d07841db571506253732 /poi | |
parent | 9e85169bdffd50ef729621ac4e296d54a0e61160 (diff) | |
download | poi-3f3d194689a21a81325240a3810e3dc6956bb81c.tar.gz poi-3f3d194689a21a81325240a3810e3dc6956bb81c.zip |
improve performance of time zone lookup
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898125 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi')
-rw-r--r-- | poi/src/main/java/org/apache/poi/ss/usermodel/DateUtil.java | 4 |
1 files changed, 2 insertions, 2 deletions
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(); } |