Github user CarbonDataQA commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1254#discussion_r134010107
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/keygenerator/directdictionary/timestamp/DateDirectDictionaryGenerator.java
 ---
    @@ -154,14 +147,14 @@ private int 
generateDirectSurrogateKeyForNonTimestampType(String memberStr) {
       }
     
       private int generateKey(long timeValue) {
    -    long milli = timeValue + 
threadLocalLocalTimeZone.get().getOffset(timeValue);
    -    return (int) Math.floor((double) milli / MILLIS_PER_DAY) + cutOffDate;
    +    return (int) Math.floor((double) timeValue / MILLIS_PER_DAY) + 
cutOffDate;
       }
     
       public void initialize() {
         if (simpleDateFormatLocal.get() == null) {
           simpleDateFormatLocal.set(new SimpleDateFormat(dateFormat));
           simpleDateFormatLocal.get().setLenient(false);
    +      simpleDateFormatLocal.get().setTimeZone(TimeZone.getTimeZone("GMT"));
    --- End diff --
    
    Loading and querying both uses GMT here only for date, we should not be 
based on machines timezone as it gives issues


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to