function date($timestamp, $offset = 0, $dotoday = true, $date_format = "M d, Y -", $time_format = "h:i A")
{
$time_offset = (-1 * $offset * 60 * 60);
$date = gmdate($date_format." ".$time_format, $timestamp - $time_offset);
// Today/Yesterday.
if ($dotoday)
{
$today = gmdate($date_format, time() - $time_offset);
$yesterday = gmdate($date_format, time() - 86400 - $time_offset);
$date = str_replace($today, "Today,", $date);
$date = str_replace($yesterday, "Yesterday,", $date);
}
return $date;
}
šis te esot universālais timestampu parveidotajs.. ja ir sodiena tad rada today ja vakardiena tad yesterday
tas kods ir pareizs? un kur man vins jaliek? ja es lietoju php-fusion CMS