[ 
https://issues.apache.org/jira/browse/PIG-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14200480#comment-14200480
 ] 

Brian Johnson commented on PIG-4267:
------------------------------------

Really all of this code needs to be refactored. It should never have been so 
tightly coupled to joda in the first place. There should be a wrapper method 
for setting the default time zone that can be used internally and for the 
tests. I'm happy to make that change if you have a good suggestion for where 
that method should go. There are a lot of other issues I see as well looking 
through this code. For instance: CustomFormatToISO sets the default timezone to 
UTC. I haven't tried it, but I'm guessing that using that function will 
obliterate your existing timezone settings since it never captures and returns 
to the existing timezone. There could also be some multithreading issues there 
even if it did return to it??

> ToDate has incorrect timezone offsets
> -------------------------------------
>
>                 Key: PIG-4267
>                 URL: https://issues.apache.org/jira/browse/PIG-4267
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.12.0, 0.13.1
>         Environment: java version 1.7.0_72
>            Reporter: Brian Johnson
>            Assignee: Brian Johnson
>         Attachments: patch, patch
>
>
> If you set the timezone to 'America/New_York'
> Pig will return "2012-03-30 -05:00" for ToDate(1333166400000) instead of the 
> correct "2012-03-31 -04:00"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to