[ 
https://issues.apache.org/jira/browse/PIG-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Dai updated PIG-4267:
----------------------------
    Attachment: PIG-4267-5.patch

This bring a major change in DateTime internal representation. After patch, we 
use local time instead of UTC. This change looks good since the old approach 
does not deal with DTS and in most use cases people deal with local time. I 
also made several changes:
1. We shall also remove all occurrence of 
"DateTimeZone.setDefault(DateTimeZone.forOffsetMillis(DateTimeZone.UTC.getOffset(null)))"
 in tests. Those apparently try to mimic the Pig behavior in tests, and those 
tests are not testing the right scenario now. Some tests fail because we use 
local time internally in DateTime now. I made changes to fix them
2. Change ConstantCalculator to set the TimeZone
3. Rebase with trunk.

I will run tests and if all pass, I will commit the change.

> 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
>             Fix For: 0.14.0
>
>         Attachments: PIG-4267-5.patch, patch, patch, 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