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

Veena Basavaraj commented on SQOOP-1845:
----------------------------------------

Here is how we propose to solve this.

1. We have to make the hasPrecision and hasTimezone mandatory in the 
constructor of the DateTime Column Type. So we can clearly have info in the 
schema whether timezone is present or not. based on this we have to then format 
the date in the right when we we store it as a string and also use the same 
info to parse it as relevant object in JODA. 

2. That should also fix the tests.

@Qian, let me know if you want to still take this on? I can upload a patch as 
well, that you can help me test if it works in all timezones. Your review will 
be appreciated.

> Unit test failed due to different timezone
> ------------------------------------------
>
>                 Key: SQOOP-1845
>                 URL: https://issues.apache.org/jira/browse/SQOOP-1845
>             Project: Sqoop
>          Issue Type: Sub-task
>            Reporter: Richard
>            Assignee: Qian Xu
>         Attachments: SQOOP-1845.patch
>
>
> test testDateTimeISO8601Alternative in TestCSVIntermediateDataFormat 
> {code}
> assertEquals("2014-10-01T12:00:00.000-07:00", 
> dataFormat.getObjectData()[0].toString());
> {code}
> failed with such error message:
> {code}
> org.junit.ComparisonFailure: 
> Expected :2014-10-01T12:00:00.000-07:00
> Actual   :2014-10-01T12:00:00.000+08:00
> {code}
> seems issue of a different timezone, you are @ -7, and I am @ +8.



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

Reply via email to