You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2019/04/03 01:01:29 UTC

[GitHub] [drill] amansinha100 commented on a change in pull request #1729: DRILL-7150: Fix timezone conversion for timestamp from maprdb after the transition from PDT to PST

amansinha100 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_r271548124
 
 

 ##########
 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:
   This is a long chain of functions .. could you split this into couple of statements ? Helps both readability and debugging.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services