$(document).ready(function() { var d = new Date(); var timezone=document.getElementById('countrytime').innerHTML; time = d.getTime() + (d.getTimezoneOffset() * 60000); var time = 1634534614000; var bjtime = time; var gmttime = time-8*3600000; var localtime =gmttime+timezone*3600000; var da =gmttime+3600000; var db =gmttime+7200000; var dc =gmttime+10800000; var dd =gmttime+14400000; var de =gmttime+18000000; var df =gmttime+21600000; var dg =gmttime+25200000; var ba = time; var dh =gmttime+32400000; var di =gmttime+36000000; var dj =gmttime+39600000; var dk =gmttime+43200000; var xa =gmttime-3600000; var xb =gmttime-7200000; var xc =gmttime-10800000; var xd =gmttime-14400000; var xe =gmttime-18000000; var xf =gmttime-21600000; var xg =gmttime-25200000; var xh =gmttime-28800000; var xi =gmttime-32400000; var xj =gmttime-36000000; var xk =gmttime-39600000; var xl =gmttime-43200000; var dsw =gmttime+12600000; var dww =gmttime+19800000; setInterval(function(){ var bjTime = new Date(bjtime); var gmTime = new Date(gmttime); var lTime = new Date(localtime); var daTime = new Date(da); var dbTime = new Date(db); var dcTime = new Date(dc); var ddTime = new Date(dd); var deTime = new Date(de); var dfTime = new Date(df); var dgTime = new Date(dg); var dhTime = new Date(dh); var diTime = new Date(di); var djTime = new Date(dj); var dkTime = new Date(dk); var xaTime = new Date(xa); var xbTime = new Date(xb); var xcTime = new Date(xc); var xdTime = new Date(xd); var xeTime = new Date(xe); var xfTime = new Date(xf); var xgTime = new Date(xg); var xhTime = new Date(xh); var xiTime = new Date(xi); var xjTime = new Date(xj); var xkTime = new Date(xk); var xlTime = new Date(xl); var baTime = new Date(ba); var dswTime = new Date(dsw); var dwwTime = new Date(dww); $('#gmttime').text(gmTime.getFullYear()+'-'+(gmTime.getMonth()+1)+'-'+gmTime.getDate()+' '+IfZero(gmTime.getHours())+':'+IfZero(gmTime.getMinutes())+':'+IfZero(gmTime.getSeconds())); $('#bjtime').text('当前北京时间:'+bjTime.getFullYear()+'-'+(bjTime.getMonth()+1)+'-'+bjTime.getDate()+' '+IfZero(check24(bjTime.getHours()))+':'+IfZero(bjTime.getMinutes())+':'+IfZero(bjTime.getSeconds())); $('#localtime').text(IfZero(check24(lTime.getHours()))+':'+IfZero(lTime.getMinutes())+':'+IfZero(lTime.getSeconds())); $('#d1').text(daTime.getFullYear()+'-'+(daTime.getMonth()+1)+'-'+daTime.getDate()+' '+IfZero(check24(daTime.getHours()))+':'+IfZero(daTime.getMinutes())+':'+IfZero(daTime.getSeconds())); $('#d2').text(dbTime.getFullYear()+'-'+(dbTime.getMonth()+1)+'-'+dbTime.getDate()+' '+IfZero(check24(dbTime.getHours()))+':'+IfZero(dbTime.getMinutes())+':'+IfZero(dbTime.getSeconds())); $('#d3').text(dcTime.getFullYear()+'-'+(dcTime.getMonth()+1)+'-'+dcTime.getDate()+' '+IfZero(check24(dcTime.getHours()))+':'+IfZero(dcTime.getMinutes())+':'+IfZero(dcTime.getSeconds())); $('#d4').text(ddTime.getFullYear()+'-'+(ddTime.getMonth()+1)+'-'+ddTime.getDate()+' '+IfZero(check24(ddTime.getHours()))+':'+IfZero(ddTime.getMinutes())+':'+IfZero(ddTime.getSeconds())); $('#d5').text(deTime.getFullYear()+'-'+(deTime.getMonth()+1)+'-'+deTime.getDate()+' '+IfZero(check24(deTime.getHours()))+':'+IfZero(deTime.getMinutes())+':'+IfZero(deTime.getSeconds())); $('#d6').text(dfTime.getFullYear()+'-'+(dfTime.getMonth()+1)+'-'+dfTime.getDate()+' '+IfZero(check24(dfTime.getHours()))+':'+IfZero(dfTime.getMinutes())+':'+IfZero(dfTime.getSeconds())); $('#d7').text(dgTime.getFullYear()+'-'+(dgTime.getMonth()+1)+'-'+dgTime.getDate()+' '+IfZero(check24(dgTime.getHours()))+':'+IfZero(dgTime.getMinutes())+':'+IfZero(dgTime.getSeconds())); $('#d8').text(baTime.getFullYear()+'-'+(baTime.getMonth()+1)+'-'+baTime.getDate()+' '+IfZero(check24(baTime.getHours()))+':'+IfZero(baTime.getMinutes())+':'+IfZero(baTime.getSeconds())); $('#d9').text(dhTime.getFullYear()+'-'+(dhTime.getMonth()+1)+'-'+dhTime.getDate()+' '+IfZero(check24(dhTime.getHours()))+':'+IfZero(dhTime.getMinutes())+':'+IfZero(dhTime.getSeconds())); $('#d10').text(diTime.getFullYear()+'-'+(diTime.getMonth()+1)+'-'+diTime.getDate()+' '+IfZero(check24(diTime.getHours()))+':'+IfZero(diTime.getMinutes())+':'+IfZero(diTime.getSeconds())); $('#d11').text(djTime.getFullYear()+'-'+(djTime.getMonth()+1)+'-'+djTime.getDate()+' '+IfZero(check24(djTime.getHours()))+':'+IfZero(djTime.getMinutes())+':'+IfZero(djTime.getSeconds())); $('#d12').text(dkTime.getFullYear()+'-'+(dkTime.getMonth()+1)+'-'+dkTime.getDate()+' '+IfZero(check24(dkTime.getHours()))+':'+IfZero(dkTime.getMinutes())+':'+IfZero(dkTime.getSeconds())); $('#x1').text(xaTime.getFullYear()+'-'+(xaTime.getMonth()+1)+'-'+xaTime.getDate()+' '+IfZero(check24(xaTime.getHours()))+':'+IfZero(xaTime.getMinutes())+':'+IfZero(xaTime.getSeconds())); $('#x2').text(xbTime.getFullYear()+'-'+(xbTime.getMonth()+1)+'-'+xbTime.getDate()+' '+IfZero(check24(xbTime.getHours()))+':'+IfZero(xbTime.getMinutes())+':'+IfZero(xbTime.getSeconds())); $('#x3').text(xcTime.getFullYear()+'-'+(xcTime.getMonth()+1)+'-'+xcTime.getDate()+' '+IfZero(check24(xcTime.getHours()))+':'+IfZero(xcTime.getMinutes())+':'+IfZero(xcTime.getSeconds())); $('#x4').text(xdTime.getFullYear()+'-'+(xdTime.getMonth()+1)+'-'+xdTime.getDate()+' '+IfZero(check24(xdTime.getHours()))+':'+IfZero(xdTime.getMinutes())+':'+IfZero(xdTime.getSeconds())); $('#x5').text(xeTime.getFullYear()+'-'+(xeTime.getMonth()+1)+'-'+xeTime.getDate()+' '+IfZero(check24(xeTime.getHours()))+':'+IfZero(xeTime.getMinutes())+':'+IfZero(xeTime.getSeconds())); $('#x6').text(xfTime.getFullYear()+'-'+(xfTime.getMonth()+1)+'-'+xfTime.getDate()+' '+IfZero(check24(xfTime.getHours()))+':'+IfZero(xfTime.getMinutes())+':'+IfZero(xfTime.getSeconds())); $('#x7').text(xgTime.getFullYear()+'-'+(xgTime.getMonth()+1)+'-'+xgTime.getDate()+' '+IfZero(check24(xgTime.getHours()))+':'+IfZero(xgTime.getMinutes())+':'+IfZero(xgTime.getSeconds())); $('#x8').text(xhTime.getFullYear()+'-'+(xhTime.getMonth()+1)+'-'+xhTime.getDate()+' '+IfZero(check24(xhTime.getHours()))+':'+IfZero(xhTime.getMinutes())+':'+IfZero(xhTime.getSeconds())); $('#x9').text(xiTime.getFullYear()+'-'+(xiTime.getMonth()+1)+'-'+xiTime.getDate()+' '+IfZero(check24(xiTime.getHours()))+':'+IfZero(xiTime.getMinutes())+':'+IfZero(xiTime.getSeconds())); $('#x10').text(xjTime.getFullYear()+'-'+(xjTime.getMonth()+1)+'-'+xjTime.getDate()+' '+IfZero(check24(xjTime.getHours()))+':'+IfZero(xjTime.getMinutes())+':'+IfZero(xjTime.getSeconds())); $('#x11').text(xkTime.getFullYear()+'-'+(xkTime.getMonth()+1)+'-'+xkTime.getDate()+' '+IfZero(check24(xkTime.getHours()))+':'+IfZero(xkTime.getMinutes())+':'+IfZero(xkTime.getSeconds())); $('#x12').text(xlTime.getFullYear()+'-'+(xlTime.getMonth()+1)+'-'+xlTime.getDate()+' '+IfZero(check24(xlTime.getHours()))+':'+IfZero(xlTime.getMinutes())+':'+IfZero(xlTime.getSeconds())); $('#d35').text(dswTime.getFullYear()+'-'+(dswTime.getMonth()+1)+'-'+dswTime.getDate()+' '+IfZero(check24(dswTime.getHours()))+':'+IfZero(dswTime.getMinutes())+':'+IfZero(dswTime.getSeconds())); $('#d55').text(dwwTime.getFullYear()+'-'+(dwwTime.getMonth()+1)+'-'+dwwTime.getDate()+' '+IfZero(check24(dwwTime.getHours()))+':'+IfZero(dwwTime.getMinutes())+':'+IfZero(dwwTime.getSeconds())); gmttime= parseInt(gmttime) + 1000; bjtime= parseInt(bjtime) + 1000; localtime = parseInt(localtime)+1000; da = parseInt(da)+1000; db = parseInt(db)+1000; dc = parseInt(dc)+1000; dd = parseInt(dd)+1000; de = parseInt(de)+1000; df = parseInt(df)+1000; dg = parseInt(dg)+1000; dh = parseInt(dh)+1000; di = parseInt(di)+1000; dj = parseInt(dj)+1000; dk = parseInt(dk)+1000; ba = parseInt(ba)+1000; dsw = parseInt(dsw)+1000; dww = parseInt(dww)+1000; xa = parseInt(xa)+1000; xb = parseInt(xb)+1000; xc = parseInt(xc)+1000; xd = parseInt(xd)+1000; xe = parseInt(xe)+1000; xf = parseInt(xf)+1000; xg = parseInt(xg)+1000; xh = parseInt(xh)+1000; xi = parseInt(xi)+1000; xj = parseInt(xj)+1000; xk = parseInt(xk)+1000; xl = parseInt(xl)+1000; },1000); function IfZero(num) { return ((num <= 9) ? ("0" + num) : num); } function check24(hour) { return (hour >= 24) ? hour - 24 : hour; } });