-2
Ola would like to know how I can edit the code below so that it works as follows I need that when giving 12 AM the watch team has the green numbers from 12 AM to 6:45 AM after that time the team color stay and red until give again the scheduled period for the team to be green again.
<script type="text/javascript">
var myVar = setInterval(myTimer2 ,1000);
function myTimer2() {
var d = new Date(), displayDate;
if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
displayDate = d.toLocaleTimeString('pt-BR');
} else {
displayDate = d.toLocaleTimeString('pt-BR', {timeZone: 'America/Sao_Paulo'});
}
document.getElementById("relogio").innerHTML = displayDate;
}
Unfortunately the clock is not showing.
– Piciline Piciline
Is the HTML code working? I tested this code and it appeared to me the right way http://prntscr.com/sfngvl
– Tomás Lopes