Small, short code snippets that other people may find useful. Do you have a good regex that you would like to share? Share it! Even better, the code can be commented on, and improved.
// Finding the true time
function ttime()
{
// Caclulate
$time = (date("Y") * 31556926); // + [Number of Years] X [Seconds in a Year]
$time += (date("z") * 86400); // + [Number of Days] X [Seconds in a Day]
$time += (date("G") * 3600); // + [Number of Hours] X [Seconds in a Hour]
$time += (date("i") * 60); // + [Number of Minutes] X [Seconds in a Minute]
$time += date("s"); // + [Number of Seconds]
// Return
return $time;
}
Use this function to show the actual seconds from year 0.