Dynamic Date / time for HTMl (NOT JAVA)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Maartinj
    DK Veteran
    • Nov 2010
    • 2409

    #1

    Dynamic Date / time for HTMl (NOT JAVA)

    Guys .

    Who can help me .
    I have one PC with limited of acces from user.
    That PC is only for Web browser and display for me TIME (Clock) one the 24" screen.
    I need to put a date under that TIME.
    This is format for CLOCK

    <html>


    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
    <title>New Page 1</title>
    </head>


    function display_time()
    {
    $hour = date("g");
    $minute = date("i");
    $second = date("s");
    $ampm = date("a");
    for ($i=0; $i<=600; $i++){
    $minute = sprintf('%02d', $minute);
    $second = sprintf('%02d', $second);
    echo "<li class='link' id='time$i'>$hour:$minute:$second $ampm </li>";
    $second++;
    if ($second == 60) {
    $second = 0;
    $minute++;
    }
    if ($minute == 60) {
    $minute = 0;
    $hour++;
    }
    if ($hour == 13) {
    $hour = 1;
    }
    }
    }




    <body>


    </body>


    </html>


    All java script doesnt work, because cant'b be load correct
    Simple clock in HTMl working fantastic
Working...