world clock

function india(){
var chour;
var cmin;
var csce;
var tv;
var now=new Date();
chour=now.getHours();
cmin=now.getMinutes();
csce=now.getSeconds();
if(chour<10)
{
chour="0"+chour;

}
if(cmin<10)
{
cmin="0"+cmin;
}
if(csce<10)
{
csce="0"+csce;
}
if(chour<12)
{
tv="am";
}else{
tv="pm";
}
var time=chour +":"+cmin + ":"+csce + tv;
var tim;
tim=document.getElementById("time").innerHTML="INDIA "+time;
//for canada Newjoursey
var cdate=new Date();
var chour=cdate.getHours();
var cmin=cdate.getMinutes();
var csec=cdate.getSeconds();
var ctv;
var cchours=chour-9;
var ccmin=cmin-30;
if(cchours<1)
{
cchours=24-9;
if(cchours<12)
{
ctv="am";
}
else
{
ctv="pm";
}
}
else{
if(cchours<12)
{
ctv="am";
}
else
{
ctv="pm";
}
}
if(ccmin24 || aahours==24)
{
aahours=aahours-24;
if(aahours<12)
{
atv="am";
}
else
{
atv="pm";
}
}
else{
if(aahours59)
{
aahours=aahours+1;
aamin=aamin-60;
}
else
{
}

var atime=aahours +”:”+aamin + “:”+asec + atv;
var atim;
var atimm;
var mtim;
atim=document.getElementById(“atime”).innerHTML=”Sydney:” +atime;
atimm=document.getElementById(“usatime”).innerHTML=”USA:” +atime;
mtimm=document.getElementById(“mtime”).innerHTML=”Melbourne:” +atime;
//for surry and Vancouver, California,Lossangless
var sdate=new Date();
var shour=sdate.getHours();

var smin=sdate.getMinutes();

var ssec=sdate.getSeconds();
var stv;
var sshours=shour-12;
var ssmin=smin-30;
if(sshours<1)
{
sshours=sshours-24;
if(sshours<12)
{
stv="am";
}
else
{
stv="pm";
}

}
else{
if(sshours<12)
{

stv="am";
}
else
{
stv="pm";
}
}
if(ssmin<1)
{
sshours=sshours-1;
ssmin=ssmin+60;
}
else
{
}
var stime=sshours +":"+ssmin + ":"+ssec + stv;
var stim;
var vtim;
var otim;
var catim;
var la;
stim=document.getElementById("stime").innerHTML="SURRY:" +stime;
stim=document.getElementById("vtime").innerHTML="Vancouver:" +stime;
otim=document.getElementById("otime").innerHTML="Ontario:" +stime;
catim=document.getElementById("catime").innerHTML="California:" +stime;
la=document.getElementById("latime").innerHTML="Lossangless:" +stime;
//for Edminton
var edate=new Date();
var ehour=edate.getHours();
var emin=edate.getMinutes();
var esec=edate.getSeconds();
var etv;
var eehours=ehour-11;
var eemin=emin-30;
if(eehours<1)
{
eehours=24+eehours;
if(eehours<12)
{
etv="am";
}
else
{
etv="pm";
}

}
else{
if(eehours<12)
{

etv="am";
}
else
{
etv="pm";
}
}
if(eemin<1)
{
eehours=eehours-1;
eemin=eemin+60;
}
else
{
}
var etime=eehours +":"+eemin + ":"+esec + etv;
var etim;
etim=document.getElementById("etime").innerHTML="EDMINTON:" +etime;

//for Winnipeg Texas
var wdate=new Date();
var whour=wdate.getHours();
var wmin=wdate.getMinutes();
var wsec=wdate.getSeconds();
var wtv;
var wwhours=whour-10;
var wwmin=wmin-30;
if(wwhours<1)
{
wwhours=24+wwhours;
if(eehours<12)
{
etv="am";
}
else
{
etv="pm";
}

}
else{
if(wwhours<12)
{

wtv="am";
}
else
{
wtv="pm";
}
}
if(wwmin24 || pphours==24)
{
pphours=pphours-24;
if(pphours<12)
{
ptv="am";
}
else
{
ptv="pm";
}
}
else{
if(pphours59)
{
pphours=pphours+1;
ppmin=ppmin-60;
}
else
{
}

var ptime=pphours +”:”+ppmin + “:”+psec + ptv;
var ptim;
var ptimm;
ptim=document.getElementById(“ptime”).innerHTML=”Perth:” +ptime;
//ptimm=document.getElementById(“usatime”).innerHTML=”USA:” +atime;
//for London,Brimingham
var adate=new Date();
var ahour=adate.getHours();

var amin=adate.getMinutes();

var asec=adate.getSeconds();
var atv;
var aahours=ahour-4;
var aamin=amin-30;
if(aahours<1)
{
aahours=aahours+24;
if(aahours<12)
{
atv="am";
}
else
{
atv="pm";
}
}
else{
if(aahours59)
{
aahours=aahours-1;
aamin=aamin+60;
}
else
{
}

var atime=aahours +”:”+aamin + “:”+asec + atv;
var atim;
var atimm;
var mtim;
atim=document.getElementById(“ltime”).innerHTML=”London:” +atime;
atimm=document.getElementById(“btime”).innerHTML=”Brimingham:” +atime;
mtimm=document.getElementById(“litime”).innerHTML=”Liverpool:” +atime;
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s