mirror of https://github.com/CIRCL/lookyloo
fix: [JS crap] date.getMonth() starts at 0 ¯\_(ツ)_/¯
parent
4bd1c4f5fe
commit
a42ec8f6b9
|
@ -21,7 +21,7 @@ $(document).ready(function () {
|
|||
"targets": 1,
|
||||
"render": function ( data, type, row, meta ) {
|
||||
let date = new Date(data);
|
||||
return date.getFullYear() + '-' + date.getMonth().toString().padStart(2, "0") + '-' + date.getDate().toString().padStart(2, "0") + ' ' + date.toTimeString();
|
||||
return date.getFullYear() + '-' + (date.getMonth() + 1).toString().padStart(2, "0") + '-' + date.getDate().toString().padStart(2, "0") + ' ' + date.toTimeString();
|
||||
}
|
||||
}]
|
||||
} );
|
||||
|
|
Loading…
Reference in New Issue