WebClock/clock.php
efrick a53376f57e Cleaned up both the PHP/HTML and JavaScript code.
Removed the orignal PHP date formating. The code now runs so that PHP
will inishilize a view on the page and JS will then update this.
The formating of the Timezone doesn't seem to be consistant acrossed
browsers. And JS doesn't format time with leading zeros for minutes or
seconds which is odd. This may be fixed in a further revision.
2020-03-31 22:15:41 -04:00

29 lines
883 B
PHP

<html>
<head>
<title id='time_title'>
<?php
echo "Time is: " . date("H:i:s");
?>
</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="author" content="efrick"/>
<link href="/styles.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="clock.js"></script>
</head>
<body>
<h1>
Date and Time
</h1>
<div class="body">
<?php
echo "The full date and time:".
"<br>".
"<p id='time_body'>".
date("D M d Y H:i:s") .
" GMT" . date("O") . " (" . date("T") . ")"."</p>";
?>
</div>
</body>
</html>