vvysotskyi commented on a change in pull request #1729: DRILL-7150: Fix 
timezone conversion for timestamp from maprdb after the transition from PDT to 
PST
URL: https://github.com/apache/drill/pull/1729#discussion_r271664318
 
 

 ##########
 File path: 
contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/CompareFunctionsProcessor.java
 ##########
 @@ -93,7 +95,9 @@ public static CompareFunctionsProcessor 
processWithTimeZoneOffset(FunctionCall c
       protected boolean visitTimestampExpr(SchemaPath path, 
TimeStampExpression valueArg) {
         // converts timestamp value from local time zone to UTC since the 
record reader
         // reads the timestamp in local timezone if the 
readTimestampWithZoneOffset flag is enabled
-        long timeStamp = valueArg.getTimeStamp() - 
DateUtility.TIMEZONE_OFFSET_MILLIS;
+        long timeStamp = 
Instant.ofEpochMilli(valueArg.getTimeStamp()).atZone(ZoneId.of("UTC"))
 
 Review comment:
   Thanks, done.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to