mirror of
https://github.com/swizzin/swizzin_dashboard.git
synced 2024-09-20 14:56:08 +08:00
Ensure boot timestamp is calculated against UTC
This commit is contained in:
parent
386dbceecd
commit
124aca37a3
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue