From 12d85242dcca68b499a473e4786e02512da53e09 Mon Sep 17 00:00:00 2001 From: Liping Wang <1325266543@qq.com> Date: Mon, 29 Aug 2016 18:52:00 +0800 Subject: [PATCH] correct offset localtime for comments ago --- isso/js/app/globals.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/isso/js/app/globals.js b/isso/js/app/globals.js index 6c411f1..680a96c 100644 --- a/isso/js/app/globals.js +++ b/isso/js/app/globals.js @@ -10,7 +10,7 @@ define(function() { }; Offset.prototype.localTime = function() { - return new Date((new Date()).getTime() + this.values.reduce( + return new Date((new Date()).getTime() - this.values.reduce( function(a, b) { return a + b; }) / this.values.length); }; @@ -18,4 +18,4 @@ define(function() { offset: new Offset() }; -}); \ No newline at end of file +});