diff --git a/include/functions.php b/include/functions.php index 5c10ac6ac..84c1e35ff 100644 --- a/include/functions.php +++ b/include/functions.php @@ -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);