Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

local time in chat window

rusiton
2012-07-14
2012-11-15
  • rusiton
    rusiton
    2012-07-14

    Hello,
    Cannot get local time shown in the chat window. All freezes after iserting the code.. Please advise, really stucked..

    <span id="tP">&nbsp;</span>

    <script type="text/javascript">// <![CDATA[
    // Clock Script Generated By Maxx Blade's Clock v2.0d
    // http://www.maxxblade.co.uk/clock
    function tS(){ x=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); x.setTime(x.getTime()+32400000); return x; }
    function tN(){ return new Date(); }
    function lZ(x){ return (x>9)?x:'0'+x; }
    function y2(x){ x=(x<500)?x+1900:x; return String(x).substring(2,4) }
    function dT(){ window.status=''+eval(oT)+''; document.getElementById('tP').innerHTML=eval(oT); setTimeout('dT()',1000); }
    function aP(x){ return (x>11)?'午前':'午後'; }
    var dN=new Array('日','月','火','水','木','金','土'),mN=new Array('1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'),oT="mN+''+tS().getDate()+'日'+'&nbsp;&nbsp;'+dN+'&nbsp;&nbsp;'+lZ(tS().getHours())+':'+lZ(tS().getMinutes())+':'+lZ(tS().getSeconds())";
    if(!document.all){ window.onload=dT; }else{ dT(); }
    // ]]></script>