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

buddypress-trac noreply at wordpress.org
Tue Jun 24 15:15:39 UTC 2014

#4310: Members Profile Shows "active sometime ago"
 Reporter:  frank13                        |       Owner:
     Type:  enhancement                    |      Status:  new
 Priority:  normal                         |   Milestone:  Future Release
Component:  Core                           |     Version:  1.5.6
 Severity:  normal                         |  Resolution:
 Keywords:  needs-patch reporter-feedback  |

Comment (by tobyhawkins):

 Sorry if I'm being dumb here, but isn't the problem the use of strtotime()
 on line 803 in bp-core-functions?

 As I understand it, strtotime() uses the default local timezone when
 calculating the Unix timestamp. bp_core_current_time() should always be in
 UTC, which means when you put it into strtotime() the function will assume
 it's looking at a local time and try and convert it to UTC, resulting in a
 discrepancy in the timestamps if the server time is anything other than

 In the previous lines, gmmktime() is used to convert the $older_date,
 which should be a UTC time stored in the database. It would make sense to
 convert bp_core_current_time() (which should be UTC) into a timestamp
 using gmmktime() as well.

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

More information about the buddypress-trac mailing list