WebClock/clock.php
efrick 453a3c561f First commit.
A simple webclock written in PHP, HTML, and js. No CSS is provided.
2020-03-31 16:54:09 -04:00

32 lines
1.0 KiB
PHP

<html>
<head>
<title id='time_title'>Clock</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
$temp = "The date is ";
echo $temp . longdate(time());
echo "<br>";
echo "<p id='time_body'>Clock</p>";
$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);
}
?>
<p id='time_test'>Test</p>
</div>
</body>
</html>