int2time for more than 24hrs timestamps bugfix
git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@71 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
@ -67,8 +67,13 @@ class Format
|
||||
*/
|
||||
static public function int2time($timestamp = 0)
|
||||
{
|
||||
$time = date(self::$time_format, $timestamp - self::$timezone_offset);
|
||||
return $time;
|
||||
$hours = floor($timestamp / 3600);
|
||||
$minutes = floor(($timestamp / 60) - ($hours * 60));
|
||||
$seconds = $timestamp - ($hours * 3600) - ($minutes * 60);
|
||||
|
||||
return ($hours < 10 ? ('0' . $hours) : $hours)
|
||||
. ':' . ($minutes < 10 ? ('0' . $minutes) : $minutes)
|
||||
. ':' . ($seconds < 10 ? ('0' . $seconds) : $seconds);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user