Ensure boot timestamp is calculated against UTC

This commit is contained in:
liaralabs 2020-03-13 15:32:50 -07:00
parent 386dbceecd
commit 124aca37a3
2 changed files with 2 additions and 2 deletions

View file

@ -24,7 +24,7 @@ else:
boottimestamp = os.stat("/proc").st_ctime
boottimeutc = datetime.datetime.fromtimestamp(boottimestamp).strftime('%b %d, %Y %H:%M:%S')
boottimeutc = datetime.datetime.utcfromtimestamp(boottimestamp).strftime('%b %d, %Y %H:%M:%S')
def str_to_class(str):
return getattr(sys.modules[__name__], str)

View file

@ -5,7 +5,7 @@ window.onload = function() {
};
function countUpFromTime(countFrom, id) {
countFrom = new Date(countFrom).getTime();
var now = new Date(),
var now = new Date(new Date().toUTCString().substr(0, 25)),
countFrom = new Date(countFrom),
timeDifference = (now - countFrom);