<?php
// cldate.php
// SVG Network Clock
// Called by svg_clock.php
// Thanks to The PHP Anthology Volume II: Applications
if (isset($_GET['timezone'])) {
if (str_replace("+"," ",urldecode($_GET['timezone'])) == "") {
date_default_timezone_set("UTC");
} else {
date_default_timezone_set(str_replace("+"," ",urldecode($_GET['timezone'])));
}
} else {
date_default_timezone_set("UTC");
}
$thedate=date('l H:i:s d M Y e');
if (isset($_GET['both'])) {
echo $thedate . '</text><circle id="cclock" cx="200" cy="200" r="150" fill="navy"/><text>';
} else if (isset($_GET['analogue'])) {
echo $thedate . '</text><circle id="cclock" cx="200" cy="200" r="150" fill="navy"/><text>';
} else {
echo $thedate;
}
?>