2883: Adjust timestamp display based on timezone and locale.
authorpeter <peter@swyman.shell.4xphq.arvadosapi.com>
Thu, 12 Jun 2014 01:59:12 +0000 (01:59 +0000)
committerpeter <peter@swyman.shell.4xphq.arvadosapi.com>
Thu, 12 Jun 2014 01:59:12 +0000 (01:59 +0000)
apps/workbench/app/assets/stylesheets/log_viewer.scss
apps/workbench/app/views/jobs/_show_log.html.erb

index 57f187c7f8bcdd7207f6e6d2f03ba98702111111..5c4a729c98a748c35b558a39cdc59ca1a166865c 100644 (file)
@@ -10,7 +10,7 @@
      display: none;
    }
    th.timestamp {
-     width: 13em;
+     width: 15em;
    }
    th.type {
      width: 9em;
index a3e73fa13683794b36bd08ad468af589f1d59fb2..06d7df1db46fccffaeb80025eb245f8f4948a9ab 100644 (file)
@@ -5,6 +5,9 @@ function addToLogViewer(logViewer, lines) {
   for (var a in lines) {
     var v = lines[a].match(re);
     if (v != null) {
+
+    var ts = new Date(Date.UTC(v[2], v[3], v[4], v[6], v[7], v[8]));
+
     v11 = v[11];
     if (typeof v[11] === 'undefined') {
       v11 = '&nbsp;';
@@ -30,7 +33,7 @@ function addToLogViewer(logViewer, lines) {
 
     logViewer.add({
       id: logViewer.items.length,
-      timestamp: v[1] + " " + v[5],
+      timestamp: ts.toLocaleDateString() + " " + ts.toLocaleTimeString(),
       taskid: v11,
       message: message,
       type: type