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

 ##########
 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:
   I will be using DateTimeZone.getDefault() now.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to