You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by lionelcao <gi...@git.apache.org> on 2017/08/16 06:02:30 UTC

[GitHub] carbondata pull request #1254: [CARBONDATA-1379] Fixed Date range filter wit...

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

    https://github.com/apache/carbondata/pull/1254#discussion_r133364318
  
    --- 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 --
    
    Does it mean carbon will process all Date/TimeStamp as GMT?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---