Re: Test cases that require a UTC timezone.

2017-07-09 Thread Paul Rogers
Hi Muhammad,

While I can’t comment on the specific test cases, I can say that Drill always 
uses the server’s own timezone to hold dates and times. Not sure how this is 
affecting the tests, but the same date/time will have a different numeric value 
in each time zone. That is, “2 PM on July 9, 2017” is interpreted as “2 PM on 
July 9, 2017 in your server's time zone”, which is then stored using an offset 
from the epoch UTC, but with that value reinterpreted as an offset from the 
epoch in your time zone.

The reinterpreted UTC value is then sent to the client where it is 
reinterpreted again as an offset from the epoch in the client’s own timezone. 
So, on your server, “2 PM on July 9, 2017” is interpreted as “2 PM on July 9, 
2017 GMT+2”, but when I connect to the server, do a query, and obtain time 
data, it is reinterpreted as “2 PM on July 9, 2017 GMT-8."

This mostly works, but does lead to the well known issues that Joda time (and, 
later, the JDK 8 time library) were designed to resolve.

So, to run time tests, you may have to understand our somewhat convoluted time 
mapping to make things work.

Thanks,

- Paul

> On Jul 9, 2017, at 7:47 AM, Muhammad Gelbana  wrote:
> 
> While trying to run Drill's test cases
> , I found that one of the
> failing tests would succeed
> 
> if the timezone was set to UTC (Mine is GMT+2).
> 
> When I looked around for other test cases that may require timezones, I
> found a couple of tests ignored (Marked with @Ignore) because they depend
> on timezones !
> 
> Would someone please tell me how can I set the timezone for a test case ?
> Also sharing a guide about Drill's tests classes, packages,
> architecture...etc, would be very helpful.
> 
> -Gelbana



Test cases that require a UTC timezone.

2017-07-09 Thread Muhammad Gelbana
While trying to run Drill's test cases
, I found that one of the
failing tests would succeed

if the timezone was set to UTC (Mine is GMT+2).

When I looked around for other test cases that may require timezones, I
found a couple of tests ignored (Marked with @Ignore) because they depend
on timezones !

Would someone please tell me how can I set the timezone for a test case ?
Also sharing a guide about Drill's tests classes, packages,
architecture...etc, would be very helpful.

-Gelbana