A PHP Remake of the Rocknarok Multiverse Time clock https://rmt.yandols.xyz
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RMT-Clock-PHP/servertime.php

28 lines
931 B

<?php
// Rocknarok Multiverse Time Clock
// Server Time API Module
// Process client requested data
$data = $_POST['server'];
// If client requested datetime for Rocknarok Universe (General Timezone).
if ($data == 'ru_general') {
// Set current datetime of Rocknarok Universe.
$rutime=date_create();
date_add($rutime,date_interval_create_from_date_string("-579 years"));
date_add($rutime,date_interval_create_from_date_string("-6 months"));
date_add($rutime,date_interval_create_from_date_string("12 days"));
date_add($rutime,date_interval_create_from_date_string("2 hours"));
date_add($rutime,date_interval_create_from_date_string("17 minutes"));
date_add($rutime,date_interval_create_from_date_string("6 seconds"));
// Return current datetime to requester.
echo date_format($rutime,"Y/m/d H:i:s");
exit();
3 years ago
}
// If client requested a server not on the list or is request is malformed.
echo "Something went wrong.";
exit();
?>