<?php
/**
* last_restart_date() Function
* Created by: Joshua H. (TRUSTAbyss)
*
* This function is very similar to the date function, but instead
* it will return the last restart date.
*
* Usage: last_restart_date(DATE_FORMAT, SECONDS_UPTIME)
* This function accepts one last argument as a boolean to see if it
* should display a GMT date or not.
*/
function last_restart_date($date_format, $secs_uptime, $gmt = true)
{
if ($gmt) // The date is formatted for Greenwich Mean Time (Default).
{
}
else // The date is formatted for the server's local time.
{
return date($date_format,
time()-
$secs_uptime);
}
}
// Output the date and time when we restarted Abyss Web Server. A very useful function!
echo '<b>Last Restart Date:</b> <br>'.last_restart_date
('F d, Y @ h:i A',
$_SERVER['X_ABYSS_STATS_HOST_CURRENT_UPTIME']);
?>