Skip to content

Commit 8dc3e38

Browse files
tarampampamCopilot
andauthored
Update templates/win98.html
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent a5b755e commit 8dc3e38

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

templates/win98.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,10 @@
417417
const hours = String(now.getHours()).padStart(2, '0');
418418
const minutes = String(now.getMinutes()).padStart(2, '0');
419419
const ampm = Number(hours) >= 12 ? 'PM' : 'AM';
420-
const formattedTime = `${hours % 12 || 12}:${minutes} ${ampm}`;
420+
const hours24 = now.getHours();
421+
const minutes = String(now.getMinutes()).padStart(2, '0');
422+
const ampm = hours24 >= 12 ? 'PM' : 'AM';
423+
const formattedTime = `${(hours24 % 12) || 12}:${minutes} ${ampm}`;
421424

422425
document.querySelectorAll('.clock').forEach($el => $el.textContent = formattedTime);
423426
};

0 commit comments

Comments
 (0)