- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
function unix_timestamp_to_human ($timestamp = "", $format = 'D d M Y - H:i:s')
{
if (empty($timestamp) || ! is_numeric($timestamp)) $timestamp = time();
return ($timestamp) ? date($format, $timestamp) : date($format, $timestamp);
}
$unix_time = "1251208071";
echo unix_timestamp_to_human($unix_time); //Return: Tue 25 Aug 2009 - 14:47:51
Lowezar 15.06.2013 09:06 # +5
Vizer 19.06.2013 17:47 # +1
Але, часы есть? А если найду?
guest 21.06.2013 11:47 # 0