After upgrade from 7.8.20 to 7.8.23 all activity stream items say "0 seconds ago"

Currently using LTS 7.8.20. After updating to 7.8.23, all feeds in the activity stream, even the old ones, are marked as being created “0 seconds ago.”

Expected Behavior: Should have correct time since the item was created
Actual Behavior: Only shows “0 seconds ago”

We saw that a similar issue was reported for upgraders to 7.10.5. A fix did not get in until 7.10.8:
#5918 Fixed #5918 - Activity Stream elapsed time calculation

What is the status of this fix for the LTS 7.8.x series? Can we expect one in the 7.8.x series?

I don’t think it’s getting included in the 7.8.x branch, probably because no one was aware that this was a problem in that branch.

Can you please try (after backing up those files) applying the fix in your system, to confirm it works?

https://github.com/salesagility/SuiteCRM/commit/1c75cce375d87b7892482babe97c221799fcf015

With that information we can arrange things so that it gets included in the 7.8.x branch also. Thanks.

I upgraded to 7.8.24 first, then merged the fix and it’s working well. I moved it into our production – after some preliminary tests – with the caveat that the team stop work immediately if they see any side effects on activity timestamps such as creation dates or modified dates. Two days and no issues.

The original 7.8.24 file, SugarFeed.php, is not using “public static” for methods/functions, only “static”, but I did make getTimeLapse() “public static” for my patch, and no others. It looks like most methods are declared public static in the 7.10 branch. Also, the $timedate variable is the only global variable now in this file, whereas none existed in the original 7.8.24 release. Here’s what we look like now…

[i]public static function getTimeLapse($startDate)
{
global $timedate;

    $nowTs = $timedate->getNow()->ts;
   
    if (null !== ($userStartDate = $timedate->fromUser($startDate))) {
        $userStartDateTs = $userStartDate->ts;
    } else {
        LoggerManager::getLogger()->warn('Invalid $startDate');
        return '';
    }
    $seconds = $nowTs - $userStartDateTs;
    $minutes = $seconds / 60;
    $seconds = $seconds % 60;
    $hours = floor($minutes / 60);
    ...[/i]

Thanks for the direction on this; nice to get the 4 new releases into production.