Repository: kylin Updated Branches: refs/heads/master 89e4b53da -> 7e71df947
KYLIN-2297 Signed-off-by: zhongjian <jiat...@163.com> Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/7e71df94 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/7e71df94 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/7e71df94 Branch: refs/heads/master Commit: 7e71df9479ebc82b39211945a83f3147ddb70592 Parents: 89e4b53 Author: luguosheng <550175...@qq.com> Authored: Thu Dec 29 16:54:15 2016 +0800 Committer: zhongjian <jiat...@163.com> Committed: Thu Jan 5 11:27:13 2017 +0800 ---------------------------------------------------------------------- webapp/app/js/directives/directives.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/7e71df94/webapp/app/js/directives/directives.js ---------------------------------------------------------------------- diff --git a/webapp/app/js/directives/directives.js b/webapp/app/js/directives/directives.js index 3d18451..ca08493 100644 --- a/webapp/app/js/directives/directives.js +++ b/webapp/app/js/directives/directives.js @@ -278,12 +278,17 @@ KylinApp.directive('kylinPagination', function ($parse, $q) { }); ctrl.$parsers.push(function (value) { - if(/\d{4}-\d{1,2}-\d{1,2}\s+(\d{1,2}:\d{1,2}:\d{1,2})/.test(value)) { - value=new Date(value); + var date; + if(/^\d{4}-\d{1,2}-\d{1,2}(\s+\d{1,2}:\d{1,2}:\d{1,2})?$/.test(value)) { + date=new Date(value); + if(!date||date&&!date.getTime()){ + return value; + }else{ + return date.getTime()-(60000 * date.getTimezoneOffset()); + } }else{ return value; } - return value.getTime()-(60000 * value.getTimezoneOffset()); }); } };