diff options
author | Tim Allison <tallison@apache.org> | 2016-10-28 14:11:52 +0000 |
---|---|---|
committer | Tim Allison <tallison@apache.org> | 2016-10-28 14:11:52 +0000 |
commit | a1c047552cfa6dab3cef337fc0efaaed452fffa1 (patch) | |
tree | 07511b0d07ae7e8164a4e9c5565c497598042883 /src/ooxml/java/org/apache/poi/openxml4j | |
parent | 0ec3c4cd14213cbe91f0dbdc05ecfce45e9bfa9a (diff) | |
download | poi-a1c047552cfa6dab3cef337fc0efaaed452fffa1.tar.gz poi-a1c047552cfa6dab3cef337fc0efaaed452fffa1.zip |
60315 -- allow 'yyyy-MM-dd' as a valid date format in metadata in OPCParser
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1767026 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/java/org/apache/poi/openxml4j')
-rw-r--r-- | src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java index b8091973e9..6fb7f65be8 100644 --- a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java +++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java @@ -55,6 +55,7 @@ public final class PackagePropertiesPart extends PackagePart implements private final static String[] DATE_FORMATS = new String[]{ DEFAULT_DATEFORMAT, "yyyy-MM-dd'T'HH:mm:ss.SS'Z'", + "yyyy-MM-dd" }; //Had to add this and TIME_ZONE_PAT to handle tz with colons. @@ -635,7 +636,7 @@ public final class PackagePropertiesPart extends PackagePart implements if (date == null) { return ""; } - + SimpleDateFormat df = new SimpleDateFormat(DEFAULT_DATEFORMAT, Locale.ROOT); df.setTimeZone(LocaleUtil.TIMEZONE_UTC); return df.format(date); |