|
|
|
|
31
|
function convertTimestamp(UNIX_TS) {
|
31
|
function convertTimestamp(UNIX_TS) {
|
32
|
var date = new Date(UNIX_TS * 1000);
|
32
|
var date = new Date(UNIX_TS * 1000);
|
33
|
var year = date.getFullYear();
|
33
|
var year = date.getFullYear();
|
34
|
- var month = date.getMonth()+1 < 10 ? '0'+date.getMonth()+1 : date.getMonth()+1;
|
|
|
|
|
34
|
+ var month = (date.getMonth()+1) < 10 ? '0'+(date.getMonth()+1) : (date.getMonth()+1);
|
35
|
var day = date.getDate() < 10 ? '0'+date.getDate() : date.getDate();
|
35
|
var day = date.getDate() < 10 ? '0'+date.getDate() : date.getDate();
|
36
|
var hour = date.getHours() < 10 ? '0'+date.getHours() : date.getHours();
|
36
|
var hour = date.getHours() < 10 ? '0'+date.getHours() : date.getHours();
|
37
|
var min = date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes();
|
37
|
var min = date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes();
|