Fix home time

This commit is contained in:
2024-06-02 12:44:36 +10:00
parent 208273378a
commit 8e481e391d

View File

@@ -35,7 +35,7 @@ import { md_gallery } from "./gallery.js";
var hours = date.getHours();
var minutes = date.getMinutes();
var seconds = date.getSeconds();
var ampm = hours >= 12 ? "PM" : "AM";
var ampm = (hours >= 12 || hours == 0) ? "PM" : "AM";
hours = hours % 12;
hours = hours ? hours : 12; // the hour '0' should be '12'