[gnome-shell/zeitgeist] Convert stringified timestamps from D-Bus to integers



commit 23d1d1861982b3c8d99915a8fb2ee0ae49232db1
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Mar 31 13:07:44 2011 -0400

    Convert stringified timestamps from D-Bus to integers
    
    We already had the symmetrical code to convert numerical timestamps to strings before
    sending out D-Bus requests, anyway.
    
    Signed-off-by: Federico Mena Quintero <federico gnome org>

 js/misc/zeitgeist.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/misc/zeitgeist.js b/js/misc/zeitgeist.js
index 2709ac5..93c7e66 100644
--- a/js/misc/zeitgeist.js
+++ b/js/misc/zeitgeist.js
@@ -134,7 +134,7 @@ Event.fromPlain = function(rawEvent) {
                           subjects, // subjects
                           rawEvent[2]);// payload
     event.id = rawEvent[0][0]; // id
-    event.timestamp = rawEvent[0][1]; // timestamp
+    event.timestamp = parseInt(rawEvent[0][1], 10); // timestamp - it comes as a string over d-bus (yuck)
     return event;
 };
 



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