#543 closed defect (bug) (fixed)
New Post not added to activity (site wide or user)
Reported by: | westpointer | Owned by: | |
---|---|---|---|
Milestone: | Priority: | major | |
Severity: | Version: | ||
Component: | Keywords: | ||
Cc: |
Description
When a new post is published, site wide activity and user activity are not updated.
I've tracked this down to bp-blogs.php, line 443
if ( $recorded_post->date_created >= strtotime( "-30 minutes" ) ) {
I tested changing the time to -3000 and the post was added to the activity tables. I think the problem is that $recorded_post->date_created is based on my time zone, EST. But strtotime( "-30 minutes" ) is using mountain time (the wpmu default time zone). Therefor, my new post always evaluates as being more than 30 minutes old.
Change History (5)
#2
@
16 years ago
OK, this is a confirmed bug. The post_date reflects the time zone set for the blog which is mountain time. I'm in the eastern time zone so my post was seen by this line of code as 2 hours old as soon as I added the post. We need to off-set for the time zone.
REPLACE:
if ( $recorded_post->date_created >= strtotime( "-30 minutes" ) )
WITH
' if ( $recorded_post->date_created >= (current_time('timestamp') - 30) )
that will fix the problem!
No, not mountain time, it must be evaluating using GMT.