попробуйте
amount = Math.floor(amount / 1e3);
days = Math.floor(amount / 86400);
amount = amount % 86400;
hours = Math.floor(amount / 3600);
amount = amount % 3600;
mins = Math.floor(amount / 60);
amount = amount % 60;
secs = Math.floor(amount);
заменить на
amount = Math.floor(amount / 1e3);
days = Math.floor(amount / 86400);
days = (days < 10) ? ('0' + days) : days;
amount = amount % 86400;
hours = Math.floor(amount / 3600);
hours = (hours < 10) ? ('0' + hours) : hours;
amount = amount % 3600;
mins = Math.floor(amount / 60);
mins = (mins < 10) ? ('0' + mins) : mins;
amount = amount % 60;
secs = Math.floor(amount);
secs = (secs < 10) ? ('0' + secs) : secs;