+ Reply
Results 1 to 3 of 3
  1. #1
    iPhone? More like MyPhone muckpuck's Avatar
    Join Date
    Apr 2009
    Location
    Sweden
    Posts
    136
    Thanks
    10
    Thanked 10 Times in 10 Posts

    Default .HTML Clock Widget is 88:88...

    Hi. I'm making a theme, where I use a clock widget. But the widget is just saying that the clock is 88:88... Can someone take a minute to check the .HTML file?

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    iPhone? More like MyPhone muckpuck's Avatar
    Join Date
    Apr 2009
    Location
    Sweden
    Posts
    136
    Thanks
    10
    Thanked 10 Times in 10 Posts

    Anyone?

    Ok... I tried some stuff... Adding some text, removing some text... It works now
    Last edited by muckpuck; 02-21-2010 at 10:00 AM. Reason: Automerged Doublepost

  3. #3
    iPhone? More like MyPhone candymanmike's Avatar
    Join Date
    Mar 2009
    Location
    MiddleOfNowhere, Wa. a.k.a. the 360
    Posts
    176
    Thanks
    93
    Thanked 88 Times in 51 Posts

    is this clock in 12 or 24 hour format? i looked at your code and the code for my HTC ClockCal i released on cydia. the only real difference i saw in the code was that yours had this in it:


    function dotime(){
    theTime=setTimeout('dotime()',1000);
    d = new Date();
    hr= d.getHours()+100;
    mn= d.getMinutes()+100;
    se= d.getSeconds()+100;
    tot=''+hr+mn+se;


    and mine reads:
    function dotime(){
    theTime=setTimeout('dotime()',1000);
    d = new Date();
    hr= d.getHours()+100;
    mn= d.getMinutes()+100;
    se= d.getSeconds()+100;
    if(hr==100){hr=112;am_pm='am';}
    else if(hr<112){am_pm='am';}
    else if(hr==112){am_pm='pm';}
    else if(hr>112){am_pm='pm';hr=(hr-12);}
    tot=''+hr+mn+se;


    but mine is 12 hour format. i see you are in sweden so yours i am assuming is 24 hour format? i remember having the 88:88 problem when i was first making mine too. don't remember what i did to get out of it.

    maybe try my code but see if changing this line
    else if(hr>112){am_pm='pm';hr=(hr-12);}

    to

    else if(hr>112){am_pm='pm';hr=(hr-24);}

    does the trick
    Last edited by candymanmike; 02-21-2010 at 11:56 AM.
    Visit us on your sister site at www.ModMyMobile.com
    Follow me on Twitter @CandymanMike & on My Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts