You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by zh...@apache.org on 2016/09/08 09:47:57 UTC

kylin git commit: KYLIN-2003 error start time

Repository: kylin
Updated Branches:
  refs/heads/master d68016952 -> ded3b5858


KYLIN-2003 error start time


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/ded3b585
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/ded3b585
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/ded3b585

Branch: refs/heads/master
Commit: ded3b58583e76ab1234ac48459c264196c98f04b
Parents: d680169
Author: Jason <ji...@163.com>
Authored: Thu Sep 8 17:47:26 2016 +0800
Committer: Jason <ji...@163.com>
Committed: Thu Sep 8 17:47:26 2016 +0800

----------------------------------------------------------------------
 webapp/app/js/filters/filter.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/ded3b585/webapp/app/js/filters/filter.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/filters/filter.js b/webapp/app/js/filters/filter.js
index 4e8d210..f9f7165 100755
--- a/webapp/app/js/filters/filter.js
+++ b/webapp/app/js/filters/filter.js
@@ -152,16 +152,16 @@ KylinApp
       var convertedMillis = item;
       if (gmttimezone.indexOf("GMT+") != -1) {
         var offset = gmttimezone.substr(4, 1);
-        convertedMillis = item + offset * 60 * 60000 + localOffset * 60000;
+        convertedMillis = new Date(item).getTime() + offset * 60 * 60000 + localOffset * 60000;
       }
       else if (gmttimezone.indexOf("GMT-") != -1) {
         var offset = gmttimezone.substr(4, 1);
-        convertedMillis = item - offset * 60 * 60000 + localOffset * 60000;
+        convertedMillis = new Date(item).getTime() - offset * 60 * 60000 + localOffset * 60000;
       }
       else {
         // return PST by default
         timezone = "PST";
-        convertedMillis = item - 8 * 60 * 60000 + localOffset * 60000;
+        convertedMillis = new Date(item).getTime() - 8 * 60 * 60000 + localOffset * 60000;
       }
       return $filter('date')(convertedMillis, format) + " " + timezone;