]> git.wh0rd.org - tt-rss.git/commitdiff
Merge branch 'master' of github.com:gothfox/Tiny-Tiny-RSS
authorAndrew Dolgov <noreply@fakecake.org>
Sat, 18 Jul 2015 18:36:29 +0000 (21:36 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Sat, 18 Jul 2015 18:36:29 +0000 (21:36 +0300)
include/functions.php

index e5f2ca48667888bfec253690c651d70c4a74a0c9..c27455220bd77a43e39e05cb74d93f9a121f3b66 100644 (file)
        function smart_date_time($timestamp, $tz_offset = 0, $owner_uid = false, $eta_min = false) {
                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));
                } else if (date("Y.m.d", $timestamp) == date("Y.m.d", time() + $tz_offset)) {
                        return date("G:i", $timestamp);