I'm trying a new lockscreen, but the time on it is in 24HR format. This looks like the JavaScript file for it. Could anyone convert it to 12HR, please?
http://cl.ly/65204df146c84d06cbc1
http://cl.ly/65204df146c84d06cbc1
PHP:
function init ( )
{
timeDisplay = document.createTextNode ( "" );
document.getElementById("hours").appendChild ( timeDisplay );
document.getElementById("minutes").appendChild ( timeDisplay );
document.getElementById("seconds").appendChild ( timeDisplay );
}
function updateClock ( )
{
var currentTime = new Date ( );
var currentHours = currentTime.getHours ( );
var currentMinutes = currentTime.getMinutes ( );
var currentSeconds = currentTime.getSeconds ( );
currentHours = ( currentHours < 10 ? "0" : "" ) + currentHours;
currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;
document.getElementById("hours").firstChild.nodeValue = currentHours;
document.getElementById("minutes").firstChild.nodeValue = currentMinutes;
document.getElementById("seconds").firstChild.nodeValue = currentSeconds;
}