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

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Tue Jul 10 15:07:32 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):

 > gmdate('m/d/y g:i:s a') = 07/10/12 2:51:38 pm [that's not right]

 That *is* right. `gmdate()` is supposed to return the current UTC time.
 So...

 > Found it @boonepgorges
 > bp_core_current_time() is 2012-07-10 14:15:34

 That actually isn't the problem. `bp_core_current_time()`, with default
 parameters, is designed to return UTC, so it appears to be working
 correctly.

 So the problem must be with the other date (`$older_date`) being used to
 calculate `bp_core_time_since()`. In the case of "last active" dates, this
 ultimately comes from a key in the wp_usermeta table called
 `'last_activity'`. As you can see in `bp_core_record_activity()` (also in
 bp-core-functions.php), that data should be stored as UTC as well, but
 it's possible that it's not. Can you check the database to see? For some
 recently active user with numeric ID N (assuming you're using the default
 db prefix 'wp_'),

 {{{SELECT * FROM wp_usermeta WHERE user_id = N AND meta_key =
 'last_activity';}}}

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


More information about the buddypress-trac mailing list