Need clock testing please

View previous topic View next topic Go down

Need clock testing please

Post by FiB on Fri Jul 24, 2015 12:36 am

Can someone who is not in the uk try this clock and tell me if it works for them by giving them their local time.


Code:
<script type="text/javascript">
var tmonth=new Array("January","February","March","April","May","June","July","August","September","October","November","December");

function GetClock(){
var d=new Date();
var nmonth=d.getMonth(),ndate=d.getDate(),nyear=d.getYear();
if(nyear<1000) nyear+=1900;

var d=new Date();
var nhour=d.getHours(),nmin=d.getMinutes(),ap;
if(nhour==0){ap=" AM";nhour=12;}
else if(nhour<12){ap=" AM";}
else if(nhour==12){ap=" PM";}
else if(nhour>12){ap=" PM";nhour-=12;}

if(nmin<=9) nmin="0"+nmin;

document.getElementById('clockbox').innerHTML=""+tmonth[nmonth]+" "+ndate+", "+nyear+" "+nhour+":"+nmin+ap+"";
}

window.onload=function(){
GetClock();
setInterval(GetClock,1000);
}
</script>
<div id="clockbox">
  <div id="clockbox" style="font:14pt Arial; color:#F70D1A;">
  </div>
</div>

FiB
New member

Posts : 17
Pts : 28
Reputation : 3
Join date : 2015-03-11
Full

View user profile

Back to top Go down

Re: Need clock testing please

Post by brandon_g on Fri Jul 24, 2015 6:14 pm

Will the clock work in phpbb2 forums?

_________________
-Brandon

~Administrator
avatar
brandon_g
ATF Staff
ATF Staff

Posts : 628
Pts : 506
Reputation : 17
Join date : 2015-01-22
Location : USA
Full

View user profile http://broadcastingduo.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum