diff --git a/clock.js b/clock.js index 5d7516d..0613d78 100644 --- a/clock.js +++ b/clock.js @@ -5,11 +5,10 @@ function startInterval(){ } function startTime(){ - var current_time = new Date(); - var formated_time = current_time.getHours() + ":" + var current_time = new Date(), + formated_time = current_time.getHours() + ":" + current_time.getMinutes() + ":" + current_time.getSeconds(); document.getElementById('time_title').innerHTML = "Time is: " + formated_time; document.getElementById('time_body').innerHTML = Date(); - document.getElementById('time_test').innerHTML = current_time.getDate(); } diff --git a/clock.php b/clock.php index 4de8867..3613970 100644 --- a/clock.php +++ b/clock.php @@ -1,6 +1,10 @@
-Clock
"; - $my_tz = date_timezone_get(); - echo date("l M d Y H:i:s") . "$my_tz"; - function longdate($timestamp) - { - return date("l F jS Y", $timestamp); - } - + echo "The full date and time:". + "". + date("D M d Y H:i:s") . + " GMT" . date("O") . " (" . date("T") . ")"."
"; ?> -Test