[buddypress-trac] [BuddyPress] #4310: Members Profile Shows "active sometime ago"

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Wed Jul 11 13:14:06 UTC 2012

#4310: Members Profile Shows "active sometime ago"
 Reporter:  frank13                        |       Owner:
     Type:  defect (bug)                   |      Status:  new
 Priority:  normal                         |   Milestone:  Awaiting Review
Component:  Core                           |     Version:  1.5.6
 Severity:  normal                         |  Resolution:
 Keywords:  needs-patch reporter-feedback  |

Comment (by boonebgorges):

 > boonepgorges

 'b' not 'p'

 > How can that be?

 During its loading process, WP sets your runtime timezone to UTC
 https://core.trac.wordpress.org/browser/tags/3.4.1/wp-settings.php#L35. So
 that's why date() is returning something different inside and outside of
 WP. I still don't understand how it is causing the problem originally
 reported in this ticket, though, because regardless of whether WP's
 internal time matches your system time, the fact is that BP is using WP's
 time for last_activity as well as for *now*, which means that time
 comparisons ("x minutes ago") should work just fine.

 > could you be kind enough to show me what the filter command for
 bp_core_current_time would look like

 Here's the syntax:

 function bbg_do_something_to_current_time( $time ) {
    // do stuff to $time (or provide a whole new value), and then return it

    return $time;
 add_filter( 'bp_core_current_time', 'bbg_do_something_to_current_time' );

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4310#comment:17>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list