summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/shared
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src/app/shared')
-rw-r--r--usecaseui-portal/src/app/shared/utils/utils.js0
-rw-r--r--usecaseui-portal/src/app/shared/utils/utils.ts18
2 files changed, 18 insertions, 0 deletions
diff --git a/usecaseui-portal/src/app/shared/utils/utils.js b/usecaseui-portal/src/app/shared/utils/utils.js
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-portal/src/app/shared/utils/utils.js
+++ /dev/null
diff --git a/usecaseui-portal/src/app/shared/utils/utils.ts b/usecaseui-portal/src/app/shared/utils/utils.ts
new file mode 100644
index 00000000..abdb9836
--- /dev/null
+++ b/usecaseui-portal/src/app/shared/utils/utils.ts
@@ -0,0 +1,18 @@
+export class Util{
+ // Time formatting milliseconds to normal
+ dateformater(vmstime) {
+ if (!vmstime) {
+ return ''
+ }
+ let mstime = Number((vmstime + '').slice(0, 13));
+ let time = new Date(mstime);
+ let year = time.getFullYear();
+ let month = time.getMonth() + 1;
+ let day = time.getDate();
+ let hours = time.getHours();
+ let minutes = time.getMinutes();
+ let seconds = time.getSeconds();
+ let formattime = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
+ return formattime;
+ }
+} \ No newline at end of file