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/27 12:05:48 UTC

[jira] [Commented] (TIKA-902) Problem with TimeZone when update poi to 3.8 from 3.6

    [ 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