mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
Always use UTC for watchdog timestamps
Forcing UTC will ensure that offset calculation is always correct
This commit is contained in:
@@ -130,7 +130,7 @@ var Unsee = (function(params) {
|
||||
Colors.Update(resp['colors']);
|
||||
Alerts.Update(resp);
|
||||
updateCompleted();
|
||||
Watchdog.Pong(moment(resp['timestamp']).unix());
|
||||
Watchdog.Pong(moment(resp['timestamp']);
|
||||
Unsee.WaitForNextReload();
|
||||
$(selectors.errors).html('');
|
||||
$(selectors.errors).hide('');
|
||||
|
||||
@@ -21,7 +21,7 @@ var Watchdog = (function() {
|
||||
// don't raise an error if autorefresh is disabled
|
||||
if (!Config.GetOption('autorefresh').Get()) return;
|
||||
|
||||
var now = moment().unix();
|
||||
var now = moment().utc().unix();
|
||||
if (now - lastTs > maxLag) {
|
||||
Grid.Clear();
|
||||
$('#errors').html(haml.compileHaml('fatal-error')({
|
||||
@@ -55,7 +55,7 @@ var Watchdog = (function() {
|
||||
|
||||
|
||||
updateTs = function(ts) {
|
||||
lastTs = ts;
|
||||
lastTs = ts.utc().unix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user