From af992ee7328110b22fb396281075a500a133d758 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 16 五月 2023 08:16:52 +0800
Subject: [PATCH] WCS console
---
src/main/webapp/static/js/common.js | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index 073bb86..3779158 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -18,7 +18,7 @@
}
// 鏃堕棿 ==>> 瀛楃涓�
-function dateToStr(date) {
+function dateToStr(date, millisecond) {
var time = new Date(date);
var y = time.getFullYear();
var M = time.getMonth() + 1;
@@ -31,7 +31,18 @@
m = m < 10 ? ("0" + m) : m;
var s = time.getSeconds();
s = s < 10 ? ("0" + s) : s;
- return y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s;
+ if (!millisecond) {
+ return y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s;
+ } else {
+ var p = time.getMilliseconds();
+ if (p < 10) {
+ p = "00" + p;
+ }
+ if (p < 100) {
+ p = "0" + p;
+ }
+ return y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s + "," + p;
+ }
}
// 瀛楃涓� ===>> 鏃堕棿
--
Gitblit v1.9.1