Skip to content

Commit

Permalink
Fix non- military hour
Browse files Browse the repository at this point in the history
  • Loading branch information
krupaldesai authored May 20, 2021
1 parent 8dace00 commit 7bdad14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simple-clock-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class SimpleClockCard extends HTMLElement {
let use_military = config.use_military !== undefined ? config.use_military : true;
let hide_seconds = config.hide_seconds !== undefined ? config.hide_seconds : false;

let time_str = (use_military ? h : h % 12 ) +
let time_str = (use_military ? h : ((h + 11) % 12) + 1 ) +
":" +
m +
(hide_seconds ? "" : ":" + s ) +
Expand Down

0 comments on commit 7bdad14

Please sign in to comment.