aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/utils.js
diff options
context:
space:
mode:
authorEmiliano Ciavatta2020-09-16 15:56:19 +0000
committerEmiliano Ciavatta2020-09-16 15:56:19 +0000
commita77f2f97f1df204c663119fe8ccafb6f274cb634 (patch)
tree294d839017dbf67d85a2501e9a0570e87602e30a /frontend/src/utils.js
parent991d3b6c91d9fe3046ec94a3716a7dd21f496feb (diff)
parentdfd6d543074b4a30c2fc990063ca69ebf8a734e1 (diff)
Merge branch 'feature/decode-gzip' into develop
Diffstat (limited to 'frontend/src/utils.js')
-rw-r--r--frontend/src/utils.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/frontend/src/utils.js b/frontend/src/utils.js
index 26c10d3..7381f69 100644
--- a/frontend/src/utils.js
+++ b/frontend/src/utils.js
@@ -59,3 +59,8 @@ export function timestampToTime(timestamp) {
let seconds = "0" + d.getSeconds();
return hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);
}
+
+export function timestampToDateTime(timestamp) {
+ let d = new Date(timestamp);
+ return d.toLocaleDateString() + " " + d.toLocaleTimeString();
+}