Código PHP:
<script type="text/javascript">
window.onload = function() {
if(document.getElementsByTagName('body')[0].style.MozTransform == ''
|| document.getElementsByTagName('body')[0].style.WebkitTransform == ''
|| document.getElementsByTagName('body')[0].style.OTransform == ''
|| document.getElementsByTagName('body')[0].style.transform == '') {
function hand() {
handS.style.MozTransform =
handS.style.WebkitTransform =
handS.style.OTransform =
handS.style.transform = 'rotate(' + (time * 6) + 'deg)';
handM.style.MozTransform =
handM.style.WebkitTransform =
handM.style.OTransform =
handM.style.transform = 'rotate(' + (time / 10) + 'deg)';
handH.style.MozTransform =
handH.style.WebkitTransform =
handH.style.OTransform =
handH.style.transform = 'rotate(' + (time / 120) + 'deg)';
}
var handH = document.getElementById('handH');
var handM = document.getElementById('handM');
var handS = document.getElementById('handS');
var timekeeper = document.getElementById('timekeeper');
var d = new Date();
var time = d.getSeconds() + 60 * d.getMinutes() + 3600 * d.getHours();
hand();
setInterval(function() {time = time+0.20; hand();}, 200);
setInterval(function() {r = new Date(); time = r.getSeconds() + 60 * r.getMinutes() + 3600 * r.getHours(); hand()}, 10000);
}
};
</script>
He estado viendo que se haria con una sentencia similar a esta:
Código PHP:
handH.style.MozTransform =
handH.style.WebkitTransform =
handH.style.OTransform =
handH.style.transform = 'rotate(' + (time / 120) + 'deg)';
Pero no consigo sacar la hora de otro país. en otra handP.style.transform= lo que sea...
Me podeis ayudar?
Gracias