From d466a5dd3e8dbf16518a24f528dc6b4c2b2253b7 Mon Sep 17 00:00:00 2001
From: chinkung <2522806+chinkung@users.noreply.github.com>
Date: Tue, 17 Apr 2018 13:26:18 +0700
Subject: [PATCH 1/3] Load moment.js in base.html
---
app/templates/base.html | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/templates/base.html b/app/templates/base.html
index 351598e..1ba7b56 100644
--- a/app/templates/base.html
+++ b/app/templates/base.html
@@ -188,6 +188,8 @@
+
+
From 34d8e7392c52260e5b6b29d5a6378c50a68f87f3 Mon Sep 17 00:00:00 2001
From: chinkung <2522806+chinkung@users.noreply.github.com>
Date: Tue, 17 Apr 2018 13:28:54 +0700
Subject: [PATCH 2/3] Display history date/time using local timezone
---
app/templates/dashboard.html | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/app/templates/dashboard.html b/app/templates/dashboard.html
index 7258e02..0f806df 100644
--- a/app/templates/dashboard.html
+++ b/app/templates/dashboard.html
@@ -162,7 +162,15 @@
"searching" : false,
"ordering" : false,
"info" : false,
- "autoWidth" : false
+ "autoWidth" : false,
+ "columnDefs": [
+ {
+ "render": function ( data, type, row ) {
+ return moment.utc(data).local().format('YYYY-MM-DD HH:mm:ss');
+ },
+ "targets": 2
+ }
+ ]
});
// set up domain list
$("#tbl_domain_list").DataTable({
From be7e012faf617a5b912fd7dd491c74204ef5e674 Mon Sep 17 00:00:00 2001
From: chinkung <2522806+chinkung@users.noreply.github.com>
Date: Tue, 17 Apr 2018 13:30:08 +0700
Subject: [PATCH 3/3] Display history date/time using local timezone
---
app/templates/admin_history.html | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/app/templates/admin_history.html b/app/templates/admin_history.html
index 6ce9469..32abb7d 100644
--- a/app/templates/admin_history.html
+++ b/app/templates/admin_history.html
@@ -68,7 +68,15 @@
"searching" : true,
"ordering" : true,
"info" : true,
- "autoWidth" : false
+ "autoWidth" : false,
+ "columnDefs": [
+ {
+ "render": function ( data, type, row ) {
+ return moment.utc(data).local().format('YYYY-MM-DD HH:mm:ss');
+ },
+ "targets": 2
+ }
+ ]
});
$(document.body).on('click', '.history-info-button', function() {
var modal = $("#modal_history_info");