public static function makeBuildTime($timestamp)
{
if (($timestamp) <= 60)
{
$time['day'] = 0;
$time['hour'] = 0;
$time['minute'] = 0;
$time['second'] = $timestamp;
return $time;
}
if (($timestamp / 60) <= 60)
{
$time['day'] = 0;
$time['hour'] = 0;
$time['minute'] = floor($timestamp / 60);
$time['second'] = $timestamp - ($time['minute'] * 60);
return $time;
}
//0 ist platzhalter solang keine größeren Einheiten drin sind.
if (($timestamp / 3600) != 0)
{
$time['day'] = 0;
$time['hour'] = floor($timestamp / 3600);
$time['minute'] = floor(($timestamp - ($time['hour'] * 3600)) / 60);
$time['second'] = $timestamp - ($time['hour'] * 3600 + $time['minute'] * 60);
return $time;
}
}