Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Invalid
-
None
-
None
-
None
-
None
Description
I use poi version 3.6
When i update to version 3.8 i have problem with date
for example creation date document
In poi 3.6 version i can see a code:
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
Date d = df.parse(s, new ParsePosition(0));
In poi 3.7 and 3.8 version i can see a code:
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
df.setTimeZone(TimeZone.getTimeZone("UTC"));
Date d = df.parse(s, new ParsePosition(0));
so if we extract date as String s = "2010-08-31T07:53:00Z" and, as mentiond above, it will be formatted as set pattern.
But since timezone is hardcoded and set to "UTC", the date is treated as 2010-08-31 07:53:00 in UTC timezone.
So, in our (UTC+3) time zone the date will be "2010-08-31T10:53:00Z" and that seems to be not correct.
P.S.
I'm not sure if this issue has been created in the correct project.
Please, move it in the correct project if needed, or explain where it should be created.