aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml/java/org/apache/poi/openxml4j
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2016-07-04 20:55:07 +0000
committerNick Burch <nick@apache.org>2016-07-04 20:55:07 +0000
commitdbb0438179a9ea8871d2a053cb859eb3b94d6612 (patch)
treec3eb641894a927ac7cbf69fe4eba757209993968 /src/ooxml/java/org/apache/poi/openxml4j
parent243f46213afa55479b81c8db190c346bfe99136f (diff)
downloadpoi-dbb0438179a9ea8871d2a053cb859eb3b94d6612.tar.gz
poi-dbb0438179a9ea8871d2a053cb859eb3b94d6612.zip
#59780 OPC support for a wider range of timezone'd created and modified date formats in package properties
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751379 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.java7
1 files changed, 5 insertions, 2 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 bb93c36926..b8091973e9 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
@@ -50,7 +50,7 @@ public final class PackagePropertiesPart extends PackagePart implements
public final static String NAMESPACE_DCTERMS_URI = "http://purl.org/dc/terms/";
- private final static String DEFAULT_DATEFORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'";
+ private final static String DEFAULT_DATEFORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'";
private final static String[] DATE_FORMATS = new String[]{
DEFAULT_DATEFORMAT,
@@ -61,9 +61,12 @@ public final class PackagePropertiesPart extends PackagePart implements
//When we move to Java 7, we should be able to add another
//date format to DATE_FORMATS that uses XXX and get rid of this
//and TIME_ZONE_PAT
+ // TODO Fix this after the Java 7 upgrade
private final String[] TZ_DATE_FORMATS = new String[]{
"yyyy-MM-dd'T'HH:mm:ssz",
- "yyyy-MM-dd'T'HH:mm:ss.SSSz"
+ "yyyy-MM-dd'T'HH:mm:ss.Sz",
+ "yyyy-MM-dd'T'HH:mm:ss.SSz",
+ "yyyy-MM-dd'T'HH:mm:ss.SSSz",
};
private final Pattern TIME_ZONE_PAT = Pattern.compile("([-+]\\d\\d):?(\\d\\d)");