Results 1 to 4 of 4

Thread: Live Clock (Mark Plachetta) broken

  1. #1
    Join Date
    Mar 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Live Clock (Mark Plachetta) broken

    1) Script Title: Live Clock

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex6/clock2.htm

    3) Describe problem: AM/PM incorrect.

    Of course i tried emailing the developer with a bounceback...

    Many months ago it worked "OK". Now both the 'demo' on the DD site and the implementation on my site show incorrect AM/PM, rendering the script useless for my international visitors and contactees.

    Then there's that old adage I shouldn't complain, it's free. But i am complaining. I do stuff all day for people that is "free" and it works.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    The DD demo works fine for me. The script simply uses your computer's time as the time to show, so the AM/PM portion is based on that as well. If you still have problems, please post more details, such as during what time of the day it's incorrect, making sure your PC's time is correct to start.
    DD Admin

  3. #3
    Join Date
    Mar 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default ok, thanks

    My mistake I guess. I will experiment. Thank you.

  4. #4
    Join Date
    Jul 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The AM/PM indicator displays incorrectly between 12noon and 1pm. This is even the case with the demo display on this website: "Demo: The time is: 12:26:00 AM (I viewed this at 12:26pm). Take a look between 12n & 1pm at: http://www.dynamicdrive.com/dynamicindex6/clock2.htm .

    The fix for this is to tweak one line of code:

    // Set up the hours for either 24 or 12 hour display:
    if (my12_hour) {
    dn = "AM";
    if (hours > 12) { dn = "PM"; hours = hours - 12; } if (hours == 0) { hours = 12; }
    } else {
    dn = "";
    }

    The above "if" statement should be changed to "11". For example:
    if (hours > 11) { dn = "PM"; hours = hours - 12; }

    Bob C
    http://www.rendervisionsconsulting.com

Bookmarks

Posting Permissions

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