You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Andrey Plotnikov (JIRA)" <ji...@apache.org> on 2012/04/25 10:56:03 UTC
[jira] [Created] (TIKA-902) Problem with TimeZone when update poi
to 3.8 from 3.6
Andrey Plotnikov created TIKA-902:
-------------------------------------
Summary: Problem with TimeZone when update poi to 3.8 from 3.6
Key: TIKA-902
URL: https://issues.apache.org/jira/browse/TIKA-902
Project: Tika
Issue Type: Bug
Reporter: Andrey Plotnikov
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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TIKA-902) Problem with TimeZone when update poi
to 3.8 from 3.6
Posted by "Andrey Plotnikov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TIKA-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13263552#comment-13263552 ]
Andrey Plotnikov commented on TIKA-902:
---------------------------------------
Thanks
> Problem with TimeZone when update poi to 3.8 from 3.6
> -----------------------------------------------------
>
> Key: TIKA-902
> URL: https://issues.apache.org/jira/browse/TIKA-902
> Project: Tika
> Issue Type: Bug
> Reporter: Andrey Plotnikov
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (TIKA-902) Problem with TimeZone when update poi
to 3.8 from 3.6
Posted by "Nick Burch (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TIKA-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nick Burch resolved TIKA-902.
-----------------------------
Resolution: Invalid
POI bugs should be reported on the POI bugzilla - http://issues.apache.org/bugzilla/buglist.cgi?product=POI
However, the Z on the end of your date means that the date really is in UTC, so setting the timezone is correct. If you want to specify that your date is in UTC+3, you must put +03:00 on the end rather than Z, that's how ISO-8601 works
> Problem with TimeZone when update poi to 3.8 from 3.6
> -----------------------------------------------------
>
> Key: TIKA-902
> URL: https://issues.apache.org/jira/browse/TIKA-902
> Project: Tika
> Issue Type: Bug
> Reporter: Andrey Plotnikov
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira