|
|
|
@ -960,7 +960,9 @@
|
|
|
|
|
function smart_date_time($timestamp, $tz_offset = 0, $owner_uid = false) {
|
|
|
|
|
if (!$owner_uid) $owner_uid = $_SESSION['uid'];
|
|
|
|
|
|
|
|
|
|
if (date("Y.m.d", $timestamp) == date("Y.m.d", time() + $tz_offset)) {
|
|
|
|
|
if (date("Y.m.d.G", $timestamp) == date("Y.m.d.G", time() + $tz_offset)) {
|
|
|
|
|
return T_sprintf("%d min", date("i", time() + $tz_offset - $timestamp));
|
|
|
|
|
} else if (date("Y.m.d", $timestamp) == date("Y.m.d", time() + $tz_offset)) {
|
|
|
|
|
return date("G:i", $timestamp);
|
|
|
|
|
} else if (date("Y", $timestamp) == date("Y", time() + $tz_offset)) {
|
|
|
|
|
$format = get_pref('SHORT_DATE_FORMAT', $owner_uid);
|
|
|
|
|