aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2010-07-07 23:04:46 +0100
committerChris Smith <toonarmy@phpbb.com>2010-07-07 23:04:46 +0100
commit9764a3213842cefea3641b2f29b58f345b578d69 (patch)
tree27e647010c2370d6523d53e21089dbddcc79e50c /phpBB/includes
parent4ac5d5e3527da561c37e24e778bd6dad23e1bf83 (diff)
downloadforums-9764a3213842cefea3641b2f29b58f345b578d69.tar
forums-9764a3213842cefea3641b2f29b58f345b578d69.tar.gz
forums-9764a3213842cefea3641b2f29b58f345b578d69.tar.bz2
forums-9764a3213842cefea3641b2f29b58f345b578d69.tar.xz
forums-9764a3213842cefea3641b2f29b58f345b578d69.zip
[ticket/9712] Future dates can be formatted as 'less than one minute ago'
PHPBB3-9712
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/session.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 0a01b4e73b..e157053e61 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -2134,9 +2134,9 @@ class user extends session
// Zone offset
$zone_offset = $this->timezone + $this->dst;
- // Show date <= 1 hour ago as 'xx min ago'
+ // Show date <= 1 hour ago as 'xx min ago' but not greater than 60 seconds in the future
// A small tolerence is given for times in the future but in the same minute are displayed as '< than a minute ago'
- if ($delta <= 3600 && ($delta >= -5 || (($now / 60) % 60) == (($gmepoch / 60) % 60)) && $date_cache[$format]['is_short'] !== false && !$forcedate && isset($this->lang['datetime']['AGO']))
+ if ($delta <= 3600 && $delta > -60 && ($delta >= -5 || (($now / 60) % 60) == (($gmepoch / 60) % 60)) && $date_cache[$format]['is_short'] !== false && !$forcedate && isset($this->lang['datetime']['AGO']))
{
return $this->lang(array('datetime', 'AGO'), max(0, (int) floor($delta / 60)));
}