From 3c68e0a1008d9a7ab308622bf9cfb7a601fd75d8 Mon Sep 17 00:00:00 2001 From: SeekDaSky Date: Fri, 8 Dec 2017 02:45:23 +0100 Subject: [PATCH] fix date --- view/vue/container/emergency.vue | 4 ++-- view/vue/container/event.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/view/vue/container/emergency.vue b/view/vue/container/emergency.vue index 73687ad..e899f72 100644 --- a/view/vue/container/emergency.vue +++ b/view/vue/container/emergency.vue @@ -30,8 +30,8 @@ export default { }; }, methods: { local_date: function(id){ - /* (1) Get current date */ - var cur = new Date( gstore.data.notif.emergency.data[id].timestamp ); + /* (1) Get current date (convert unix timestamp to javascript timestamp */ + var cur = new Date( gstore.data.notif.emergency.data[id].timestamp * 1000); /* (2) First line -> show whole date */ if( id < 1 ) diff --git a/view/vue/container/event.vue b/view/vue/container/event.vue index 91fad1f..f166ed8 100644 --- a/view/vue/container/event.vue +++ b/view/vue/container/event.vue @@ -28,7 +28,7 @@ export default { methods: { local_date: function(id){ /* (1) Get current date */ - var cur = new Date( gstore.data.notif.event.data[id].timestamp ); + var cur = new Date( gstore.data.notif.event.data[id].timestamp * 1000 ); /* (2) First line -> show whole date */ if( id < 1 )