[polari/wip/carlosg/tracker: 432/445] logger: Handle timestamps from SPARQL correctly




commit 93dd7896f735bca67758babeeee09293aa5d55df
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Feb 24 22:58:48 2019 +0100

    logger: Handle timestamps from SPARQL correctly
    
    There seems to be one unnecessary transformation here.

 src/logger.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/logger.js b/src/logger.js
index cc556126..5654e88e 100644
--- a/src/logger.js
+++ b/src/logger.js
@@ -138,8 +138,7 @@ var LogWalker = class {
         let returnFunc = r => {
             callback(r.reverse().map(m => {
                 let { text, sender, isAction, isSelf } = m;
-                let timestamp = new Date(m.time).toLocaleFormat('%s');
-                let dt = GLib.DateTime.new_from_unix_utc(timestamp);
+                let dt = GLib.DateTime.new_from_unix_utc(m.time);
                 return new Polari.Message(text, sender, dt, isAction, isSelf);
             }));
         };


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]