<?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) Cor

    (c) copyright corz.org 2005->today

*/

//$serverdate = date("r"); // handy RFC formatted
$serverdate date("D M d Y H:i:s  (T)");

$local_timezone 'GB'// see php manual for other timezone codes

// You will need a local copy of this for IE7/8 users..
$HTML5_shiv '/inc/js/html5.js';


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>
<!--[if lt IE 9]><script src='
,$HTML5_shiv,'></script><![endif]-->
<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>
var myDate = new Date();
document.write(\'local  time: \' + myDate);
</script>
<noscript><!-- JavaScript Only --></noscript>

</code>
</h3>
</div>
</body>
</html>'
;


?>
back to the source menu
downloadtest

Welcome to corz.org!

Since switching hosts (I hope you are alright, Ed! Wherever you are …) quite a few things seems to be wonky.

Juggling two energetic boys (of very different ages) on Coronavirus lockdown, I'm unlikely to have them all fixed any time soon. Mail me! to prioritise!