Re: Site Wide Activity stream not working
I just fixed this problem with a hack. My site functioned similar to the site described by Bbrian017
all of the time since requests come to the function bp_core_time_since(). I noticed the line in bp_core.php as follows:
$newer_date = ( !$newer_date ) ? ( strtotime( gmdate( ‘Y-m-d H:i:s’ ) ) + ( 60*60*0 ) ) : $newer_date;
all time since functions on my site operated normally except in site wide activity where all time was plus 7 hours. it was easy to see that I could subtract 7 hours by editing the ( 60*60*0 ) tho be ( 60*60*-7 )
This hack made the activity stream right on but replaced all the other times with the Use GMT Timezone statement. from this, the obvious hack is to copy bp_core_time_since() in its entirety and insert it just below the original the rename both lines in the function that read bp_core_time_since() to bp_core_time_since2(). this way I could keep the time adjustment for the activity stream without causing a failure of the other time since calculations that work correctly. After you have duplicated and renamed the function bp_core_time_since2, all that is left is to change the line in function 2 by your offset, in my case -7 so ( 60*60*-7 ) then change the function reference in
buddypress/bp-activity/bp-activity-templatetags.php look for line 299
function bp_activity_insert_time_since( $content, $date )
then line 306 and change bp_core_time_since to bp_core_time_since2
the end result is the code works for both after the hack