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

Paul Rogers commented on DRILL-5717:
------------------------------------

Drill dates, by design, a defined to be in the server's time zone, even when 
sent to the client, and even when being converted from data without a time zone.

Given an input of 2017-08-11T23:00:00

Drill assumes that this is a date in the local time zone, say PST. But, it 
represents the time as if PST were UTC. That is, parse the date using Java Date 
and get a time relative to the epoch UTC but interpret it as relative to the 
epoch PST.

Then, the date is sent to the client where the PST-as-UTC is interpreted as 
GMT-as (say) EST. That is, again, the time is a number relative to the epoch 
UTC (set as if that were PST), but reinterpreted as seconds since the epoch EST.

The point is, the same number is sometimes PST, sometimes EST but (to Java) is 
UTC. (This whole area is terribly confusing, so the above may be slightly off; 
DRILL-5360, DRILL-5334 explored these issues in detail.)

This can push the date into a different day.

This is by design (though, it can be argued, not perhaps the best possible 
design).

Tests must somehow work around this creative interpretation of dates.

> date time test cases is not Local independent
> ---------------------------------------------
>
>                 Key: DRILL-5717
>                 URL: https://issues.apache.org/jira/browse/DRILL-5717
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Tools, Build & Test
>    Affects Versions: 1.9.0, 1.11.0
>            Reporter: weijie.tong
>
> Some date time test cases like  JodaDateValidatorTest  is not Local 
> independent .This will cause other Local's users's test phase to fail. We 
> should let these test cases to be Local env independent.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to