mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +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:
@@ -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(' ');
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user