so you can request
coridium.us/time.php -- and you well get US Pacific time zone
or
coridium.us/time.php?zone=Europe/London
No error checking and most likely never will be
Code: Select all
<!DOCTYPE html>
<html lang=en>
<head>
<title>Coridium Time Server</title>
</head>
<body>
<?php
$timezone = htmlspecialchars($_GET["zone"]);
if ( $timezone == "")
$timezone = 'America/Los_Angeles';
$tz_object = new DateTimeZone($timezone);
$datetime = new DateTime();
$datetime->setTimezone($tz_object);
echo "time is-",$datetime->format('H:i:s');
echo "<br>";
echo "date is-",$datetime->format('m/d/Y');
?>
</body>
</html>