diff --git a/clock.css b/clock.css new file mode 100644 index 0000000..501a467 --- /dev/null +++ b/clock.css @@ -0,0 +1,3 @@ +span p{ + display:inline; +} diff --git a/clock.js b/clock.js index 4451b67..8da80ff 100644 --- a/clock.js +++ b/clock.js @@ -13,10 +13,7 @@ function startInterval(){ */ function startTime(){ var current_time = new Date(), - our_tz = current_time.getTimezoneOffset, - formated_time = current_time.getHours() + ":" - + current_time.getMinutes() + ":" - + current_time.getSeconds(); + our_tz = current_time.getTimezoneOffset; document.getElementById('time_title').innerHTML = "Time is: " + current_time.toLocaleString('en-US', {timeZone: current_tz, @@ -26,7 +23,6 @@ function startTime(){ minute:'2-digit', second:'2-digit', timeZoneName:'short'}); - //document.getElementById('time_title').innerHTML = current_tz; document.getElementById('time_body').innerHTML = current_time.toLocaleString('en-EN' ,{ timeZone: current_tz, dateStyle:'long', @@ -38,7 +34,6 @@ function startTime(){ hour:'2-digit', minute:'2-digit', second:'2-digit', - timeZoneName:'short'}) - + " " + current_time.getTimezoneOffset(); + timeZoneName:'short'}); document.getElementById('JStz').innerHTML = current_tz; } diff --git a/clock.php b/clock.php index 8917b25..86b4149 100644 --- a/clock.php +++ b/clock.php @@ -14,7 +14,6 @@ } } else{ $selectedTimezone = date_default_timezone_get(); - //date_default_timezone_set("America/Los_Angeles"); $scriptTZ = date_default_timezone_get(); } ?> @@ -29,6 +28,7 @@ + @@ -39,12 +39,10 @@
". date("D, M d, Y, H:i:s") . - " GMT" . date("O") . " (" . date("T") . ")"."
\n\t\t"; - echo 'The user timezone is now set to ' . $selectedTimezone . "
\n\t\t"; - echo 'The system timezone is now set to ' . $scriptTZ . "
\n"; + date(" T")."GMT". date("O") ."
\n\t\t"; ?>