You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/04/15 17:30:56 UTC

[GitHub] [incubator-pinot] jihaozh commented on a change in pull request #4113: [TE] Fix MySQL and H2 timestamp automatic timezone conversion issues

jihaozh commented on a change in pull request #4113: [TE] Fix MySQL and H2 timestamp automatic timezone conversion issues
URL: https://github.com/apache/incubator-pinot/pull/4113#discussion_r275466305
 
 

 ##########
 File path: thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/datasource/pinot/resultset/ThirdEyeResultSetUtils.java
 ##########
 @@ -85,11 +88,15 @@
       dataGranularity = dataTimeSpec.getDataGranularity();
       boolean isISOFormat = false;
       DateTimeFormatter inputDataDateTimeFormatter = null;
+      DateTimeFormatter serverDataDateTimeFormatter = null;
       String timeFormat = dataTimeSpec.getFormat();
       if (timeFormat != null && !timeFormat.equals(TimeSpec.SINCE_EPOCH_FORMAT)) {
         isISOFormat = true;
         inputDataDateTimeFormatter = DateTimeFormat.forPattern(timeFormat).withZone(dateTimeZone);
       }
+      if (sourceName.equals(MYSQL) || sourceName.equals(H2) ) {
+        serverDataDateTimeFormatter = DateTimeFormat.forPattern(timeFormat).withZone(DateTimeZone.forID(timezone));
 
 Review comment:
   Add some comments about `timezone` vs `dateTimeZone` 

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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org