corz.org uses cookies to remember that you've seen this notice explaining that corz.org uses cookies, okay!
<?php // ۞ // text { encoding:utf-8 ; bom:no ; linebreaks:unix ; tabs:4sp ; }
/*
webmaster server time difference
simple php script to display the difference in time between your
web server (where your site runs), and your browser.
handy for lots of things.
;o)
(c) copyright corz.org 2005->today
*/
//$serverdate = date("r"); // handy RFC formatted
$serverdate = date("D M d Y H:i:s (T)");
$local_timezone = 'Europe/London'; // see php manual for other timezone codes
echo '<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
<title>webmaster server/local time difference script</title>
<meta name="description" content="this script tells you the time on your web server, and in your browser, so you can see the difference. handy for lots of things." />
<link rel="stylesheet" href="/inc/css/main.css" type="text/css" media="screen" />
</head>
<body>
<div class="content"><h3><code>
server time: ',$serverdate,'<br />
<br />';
if ((int)PHP_VERSION >= 5) { // php5
date_default_timezone_set($local_timezone);
$serverdate = date("D M d Y H:i:s (T)");
echo 'php5 server time: ',$serverdate,'<br />
<br />';
}
echo '
<script nonce="'.$_SERVER['CSP_NONCE'].'">
var myDate = new Date();
document.write(\'local time: \' + myDate);
</script>
<noscript><!-- JavaScript Only --></noscript>
</code>
</h3>
</div>
</body>
</html>';
?>