Apple iPhone Forum und Community

Normale Version: Clock Widget von am/pm auf 24 H umschalten
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Hallo,

kann mir da jemand helfen. ich möchte die Uhr von 12H auf 24H abändern, kann mir jemand sagen was wo raus bzw rein muss?

Im rot markierten bereich muss es wohl geänder werden


Das ist der Code:

<?xml version="1.0" encoding="UTF-16"?>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

<style>
body {
background-image: url(./Wallpaper.png);background-repeat: no-repeat;


;
margin: 0;
padding: 290px 200px 0px 145px;
height: 480px;
width: 320px;
}
</style>

</head>



<table>
<td bgcolor="transparent" height="45">
<img src="T8.png" name="hr1"><img
src="T8.png" name="hr2"><img
src="C1.png" name="c"><img
src="T8.png" name="mn1"><img
src="T8.png" name="mn2">
</td></table>

<script type="text/javascript"><!-- start


T0 = new Image();T0.src = "T0.png";
T1 = new Image();T1.src = "T1.png";
T2 = new Image();T2.src = "T2.png";
T3 = new Image();T3.src = "T3.png";
T4 = new Image();T4.src = "T4.png";
T5 = new Image();T5.src = "T5.png";
T6 = new Image();T6.src = "T6.png";
T7 = new Image();T7.src = "T7.png";
T8 = new Image();T8.src = "T8.png";
T9 = new Image();T9.src = "T9.png";
dgam= new Image();dgam.src= "dgam.png";
dgpm= new Image();dgpm.src= "dgpm.png";
dgc = new Image();dgc.src = "dgc.png";

function dotime(){
theTime=setTimeout('dotime()',1000);
d = new Date();
hr= d.getHours()+100;
mn= d.getMinutes()+100;
se= d.getSeconds()+100;
if(hr==100){hr=112;am_pm='am';}
else if(hr<112){am_pm='am';}
else if(hr==112){am_pm='pm';}
else if(hr>112){am_pm='pm';hr=(hr-12);}
tot=''+hr+mn+se;
document.hr1.src = 'T'+tot.substring(1,2)+'.png';
document.hr2.src = 'T'+tot.substring(2,3)+'.png';
document.mn1.src = 'T'+tot.substring(4,5)+'.png';
document.mn2.src = 'T'+tot.substring(5,6)+'.png';
document.se1.src = 'T'+tot.substring(7,8)+'.png';
document.se2.src = 'T'+tot.substring(8,9)+'.png';

}
dotime();
//end -->
</script>


</body></html>