fix date
This commit is contained in:
parent
f468536e13
commit
3c68e0a100
|
@ -30,8 +30,8 @@ export default {
|
||||||
}; },
|
}; },
|
||||||
methods: {
|
methods: {
|
||||||
local_date: function(id){
|
local_date: function(id){
|
||||||
/* (1) Get current date */
|
/* (1) Get current date (convert unix timestamp to javascript timestamp */
|
||||||
var cur = new Date( gstore.data.notif.emergency.data[id].timestamp );
|
var cur = new Date( gstore.data.notif.emergency.data[id].timestamp * 1000);
|
||||||
|
|
||||||
/* (2) First line -> show whole date */
|
/* (2) First line -> show whole date */
|
||||||
if( id < 1 )
|
if( id < 1 )
|
||||||
|
|
|
@ -28,7 +28,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
local_date: function(id){
|
local_date: function(id){
|
||||||
/* (1) Get current date */
|
/* (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 */
|
/* (2) First line -> show whole date */
|
||||||
if( id < 1 )
|
if( id < 1 )
|
||||||
|
|
Loading…
Reference in New Issue