[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:14:28 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 frank13):

 Replying to [comment:9 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';}}}



 Here is a dump of the members that have logged in today:
 Full Texts      umeta_id        user_id         meta_key        meta_value
 Descending
         Edit    Delete  152     7       last_activity   2012-07-10
 15:07:43
         Edit    Delete  36      1       last_activity   2012-07-10
 15:07:20
         Edit    Delete  434     8       last_activity   2012-07-10
 14:34:26
         Edit    Delete  63      3       last_activity   2012-07-10
 14:21:00
         Edit    Delete  437     15      last_activity   2012-07-10
 13:32:31
         Edit    Delete  602     23      last_activity   2012-07-10
 13:32:23
         Edit    Delete  231     12      last_activity   2012-07-10
 12:24:04

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


More information about the buddypress-trac mailing list