update date to be global

This commit is contained in:
2023-01-26 13:43:43 +13:00
parent 98846a7bd3
commit 9484d80387

View File

@@ -26,6 +26,14 @@ function epochToFormattedTime(d) {
return h + ':' + m.substr(-2);
}
// Function to convert unix epoch to 00:00
function epochToFormattedTime(d) {
d = new Date(d * 1000);
var h = d.getHours();
var m = "0" + d.getMinutes();
return h + ':' + m.substr(-2);
}
// Extract start/stop time based on the unix timestamp
// First multiply by 1000 so that the argument is in milliseconds, not seconds.