summaryrefslogtreecommitdiff
path: root/system/admin/static/common/js/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'system/admin/static/common/js/util.js')
-rw-r--r--system/admin/static/common/js/util.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/system/admin/static/common/js/util.js b/system/admin/static/common/js/util.js
index 7bd821d..7f4c8ab 100644
--- a/system/admin/static/common/js/util.js
+++ b/system/admin/static/common/js/util.js
@@ -31,7 +31,16 @@ function getPartialTime(unix) {
if (hours < 10) {
hours = "0" + String(hours);
}
+
t.hh = hours;
+ if (hours > 12) {
+ t.hh = hours - 12;
+ t.pd = "PM";
+ } else if (hours === 12) {
+ t.pd = "PM";
+ } else if (hours < 12) {
+ t.pd = "AM";
+ }
var minutes = date.getMinutes();
if (minutes < 10) {