mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-17 09:31:28 +00:00
smart_date_time: better eta_min handling
This commit is contained in:
@@ -960,7 +960,7 @@
|
|||||||
function smart_date_time($timestamp, $tz_offset = 0, $owner_uid = false, $eta_min = false) {
|
function smart_date_time($timestamp, $tz_offset = 0, $owner_uid = false, $eta_min = false) {
|
||||||
if (!$owner_uid) $owner_uid = $_SESSION['uid'];
|
if (!$owner_uid) $owner_uid = $_SESSION['uid'];
|
||||||
|
|
||||||
if ($eta_min && date("Y.m.d.G", $timestamp) == date("Y.m.d.G", time() + $tz_offset)) {
|
if ($eta_min && time() + $tz_offset - $timestamp < 3600) {
|
||||||
return T_sprintf("%d min", date("i", time() + $tz_offset - $timestamp));
|
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)) {
|
} else if (date("Y.m.d", $timestamp) == date("Y.m.d", time() + $tz_offset)) {
|
||||||
return date("G:i", $timestamp);
|
return date("G:i", $timestamp);
|
||||||
|
|||||||
Reference in New Issue
Block a user