Skip to content

Commit

Permalink
Fixed clock format
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWhite147 committed Sep 25, 2018
1 parent 2f9e021 commit 8766d1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@

function setClock() {
var now = new Date();
var clockValue = now.getHours() + ":" + now.getMinutes();
var clockValue = now.getHours() + ":" + now.getMinutes().toString().padStart(2, "0");

$("#clock").html(clockValue);
}
Expand Down

0 comments on commit 8766d1b

Please sign in to comment.