Skip to content

Commit

Permalink
fix #2210
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Dec 3, 2016
1 parent ecbf00e commit 235d126
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/js/logger-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,9 @@ var renderLogEntry = function(entry) {
}

// Fields common to all rows.
var time = new Date(entry.tstamp);
tr.cells[0].textContent = padTo2(time.getHours()) + ':' +
var time = logDate;
time.setTime(entry.tstamp - logDateTimezoneOffset);
tr.cells[0].textContent = padTo2(time.getUTCHours()) + ':' +
padTo2(time.getMinutes()) + ':' +
padTo2(time.getSeconds());

Expand All @@ -561,6 +562,10 @@ var renderLogEntry = function(entry) {
return tr;
};

// Reuse date objects.
var logDate = new Date(),
logDateTimezoneOffset = logDate.getTimezoneOffset() * 60000;

/******************************************************************************/

var renderLogEntries = function(response) {
Expand Down

0 comments on commit 235d126

Please sign in to comment.