Hugging Face Deployer
Deploy bot to Hugging Face Spaces
03b405b
Raw History Blame Contribute Delete
439 Bytes
function nowIso() {
return new Date().toISOString();
}
function secondsToClock(seconds) {
const safe = Math.max(0, Math.round(Number(seconds) || 0));
const h = Math.floor(safe / 3600);
const m = Math.floor((safe % 3600) / 60);
const s = safe % 60;
return h > 0
? `${h}:${String(m).padStart(2, "0")}:${String(s).padStart(2, "0")}`
: `${m}:${String(s).padStart(2, "0")}`;
}
module.exports = { nowIso, secondsToClock };