[polari/wip/carlosg/tracker: 11/16] logger: Handle timestamps from SPARQL correctly



commit 3037bff332928f0fcb10dc622ba077b129352300
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 fd97491..448cb89 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]