Fuso horario
<script language="javascript" type="text/javascript">
<!--
<!-- Begin code
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function startclock () {
// Make sure the clock is stopped
stopclock();
showtime();
}
function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = ((hours < 10) ? "0" : "") + hours
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
document.brazil.face.value = timeValue
document.ar.face.value = timeValue
//america do sul
var hours = now.getHours() - 1;
var hours = ((hours >= 24) ? hours - 24 : hours);
var hours = ((hours < 0) ? 24 + hours : hours);
var timeValue = ((hours < 10) ? "0" : "") + hours
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
document.americasul.face.value = timeValue
//orlando
var hours = now.getHours() - 2;
var hours = ((hours >= 24) ? hours - 24 : hours);
var hours = ((hours < 0) ? 24 + hours : hours);
var timeValue = ((hours < 10) ? "0" : "") + hours
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
document.orlando.face.value = timeValue
//mexico
var hours = now.getHours() - 3;
var hours = ((hours >= 24) ? hours - 24 : hours);
var hours = ((hours < 0) ? 24 + hours : hours);
var timeValue = ((hours < 10) ? "0" : "") + hours
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
document.mexico.face.value = timeValue
//los angeles
var hours = now.getHours() - 5;
var hours = ((hours >= 24) ? hours - 24 : hours);
var hours = ((hours < 0) ? 24 + hours : hours);
var timeValue = ((hours < 10) ? "0" : "") + hours
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
document.losangeles.face.value = timeValue//uk e portugal
var hours = now.getHours() + 3;
var hours = ((hours >= 24) ? hours - 24 : hours);
var hours = ((hours < 0) ? 24 + hours : hours);
var timeValue = ((hours < 10) ? "0" : "") + hours
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
document.uk.face.value = timeValue//europa
var hours = now.getHours() + 4;
var hours = ((hours >= 24) ? hours - 24 : hours);
var hours = ((hours < 0) ? 24 + hours : hours);
var timeValue = ((hours < 10) ? "0" : "") + hours
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
document.eur.face.value = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
</script><table width="540" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="100" colspan="4"></td>
</tr>
<tr>
<td>Brasil:</td>
<td><form name="brazil" onsubmit="0">
<input type="text" size="10" name="face"/>
</form></td>
<td>Argentina e chile:</td>
<td><form name="ar" onsubmit="0">
<input type="text" size="10" name="face"/>
</form></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>+1</td>
</tr>
<tr>
<td>Mexico:</td>
<td><form name="mexico" onsubmit="0">
<input type="text" size="10" name="face"/>
</form></td>
<td>Uk e Portugal:</td>
<td><form name="uk" onsubmit="0">
<input type="text" size="10" name="face"/>
</form></td>
</tr>
<tr>
<td> </td>
<td>+1</td>
<td> </td>
<td>-1</td>
</tr>
<tr>
<td>America do sul:</td>
<td><form name="americasul" onsubmit="0">
<input type="text" size="10" name="face"/>
</form></td>
<td>Europa:(Franca,etc)</td>
<td><form name="eur" onsubmit="0">
<input type="text" size="10" name="face"/>
</form></td>
</tr>
<tr>
<td> </td>
<td>+1</td>
<td> </td>
<td>-1</td>
</tr>
<tr>
<td>EUA(orlando):</td>
<td><form name="orlando" onsubmit="0">
<input type="text" size="10" name="face"/>
</form></td>
<td>EUA(los angeles):</td>
<td><form name="losangeles" onsubmit="0">
<input type="text" size="10" name="face"/>
</form></td>
</tr>
<tr>
<td> </td>
<td>+1</td>
<td> </td>
<td>+1</td>
</tr>
</table>Discussão (2)
Carregando comentários...