mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
(trunk web) #2966: "Patch: Present time with correct number of digits in the web interface" -- added to trunk for 1.92. thanks to gongloo for the patch.
This commit is contained in:
parent
4401dcaa28
commit
7138a3e346
1 changed files with 12 additions and 1 deletions
|
@ -234,8 +234,19 @@ Math.formatTimestamp = function(seconds) {
|
||||||
if(hours == 0){
|
if(hours == 0){
|
||||||
hours = 12;
|
hours = 12;
|
||||||
}
|
}
|
||||||
|
if(hours < 10){
|
||||||
|
hours = "0" + hours;
|
||||||
|
}
|
||||||
|
var minutes = myDate.getMinutes();
|
||||||
|
if(minutes < 10){
|
||||||
|
minutes = "0" + minutes;
|
||||||
|
}
|
||||||
|
var seconds = myDate.getSeconds();
|
||||||
|
if(seconds < 10){
|
||||||
|
seconds = "0" + seconds;
|
||||||
|
}
|
||||||
|
|
||||||
time = [hours, myDate.getMinutes(), myDate.getSeconds()].join(':');
|
time = [hours, minutes, seconds].join(':');
|
||||||
|
|
||||||
return [date, time, period].join(' ');
|
return [date, time, period].join(' ');
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue