EWS bubble hover shows wrong timestamps
authorossy@webkit.org <ossy@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Oct 2014 14:34:59 +0000 (14:34 +0000)
committerossy@webkit.org <ossy@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Oct 2014 14:34:59 +0000 (14:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=137252

Reviewed by Alexey Proskuryakov.

Add "Z" suffix to timestamps to make sure if it is handled as UTC time.

* QueueStatusServer/handlers/queuestatusjson.py:
(QueueStatusJSON.get):
* QueueStatusServer/handlers/statusbubble.py:
(StatusBubble._iso_time):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174343 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/QueueStatusServer/handlers/queuestatusjson.py
Tools/QueueStatusServer/handlers/statusbubble.py

index 1755acd..82491c1 100644 (file)
@@ -1,3 +1,17 @@
+2014-10-06  Csaba Osztrogon√°c  <ossy@webkit.org>
+
+        EWS bubble hover shows wrong timestamps
+        https://bugs.webkit.org/show_bug.cgi?id=137252
+
+        Reviewed by Alexey Proskuryakov.
+
+        Add "Z" suffix to timestamps to make sure if it is handled as UTC time.
+
+        * QueueStatusServer/handlers/queuestatusjson.py:
+        (QueueStatusJSON.get):
+        * QueueStatusServer/handlers/statusbubble.py:
+        (StatusBubble._iso_time):
+
 2014-10-06  Mario Sanchez Prada  <mario@webkit.org>
 
         Unreviewed, updated list of email addresses in contributors.json
index 3f1fcf2..473c98c 100644 (file)
@@ -116,5 +116,5 @@ class QueueStatusJSON(webapp.RequestHandler):
             "queue": self._rows_for_work_items(queue),
             "bots": self._bots(queue),
         }
-        dthandler = lambda obj: obj.isoformat() if isinstance(obj, datetime.datetime) or isinstance(obj, datetime.date) else None
+        dthandler = lambda obj: obj.isoformat() + "Z" if isinstance(obj, datetime.datetime) or isinstance(obj, datetime.date) else None
         self.response.out.write(json.dumps(status, default=dthandler))
index aff302a..81d6803 100644 (file)
@@ -56,7 +56,7 @@ progress_statuses = Set([
 
 class StatusBubble(webapp.RequestHandler):
     def _iso_time(self, time):
-        return "[[" + time.isoformat() + "]]"
+        return "[[" + time.isoformat() + "Z]]"
 
     # queue_position includes items that are already active, so it's misleading.
     # For a queue that has 8 bots, being #9 in the queue actually means being #1.