// -----------------------------------------------------------------------
/**
* Converting a Unix timestamp to DateTime Ticks
*
* Equation: (UNIX_TIMESTAMP * 10000000) + 621355968000000000
*/
if ( ! function_exists('timeToTicks'))
{
function timeToTicks($time)
{
return number_format(($time * 10000000) + 621355968000000000, 0, '.', '');
}
}
// -----------------------------------------------------------------------
/**
* Converting DateTime Ticks to a Unix timestamp in PHP
*
* Equation: (TICKS – 621355968000000000) / 10000000
*/
if ( ! function_exists('ticksToTime'))
{
function ticksToTime($ticks)
{
return ($ticks - 621355968000000000) / 10000000;
}
}