Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress Activity Time is off by 5 hours


  • mgkoller
    Participant

    @mgkoller

    Hello, I’m running WordPress 3.4.2. and Buddypress 1.6.1.
    When a user or myself posts an update in the Activity stream, the time is shown correctly (i.e. 2 minutes ago), The RSS is also showing the correct times.
    BUT when I check the times in the Dashboard > Activity tab, the hours are off by exactly 5 hours. Since I need to keep track of the exact times, is there a fix/plugin/hack that I could use to fix this?

    My WordPress setting is currently set at the “Chicago” Timezone.

    (EDIT)
    Here is the correct activity update [actual time is (September 24, 2012 4:14 PM)]

    Here is the exact same activity updated viewed inside Dashboard < Activity (time is off by 5 hours)

Viewing 9 replies - 1 through 9 (of 9 total)

  • mgkoller
    Participant

    @mgkoller

    Looks like other’s have ran into this issue,
    http://premium.wpmudev.org/forums/topic/activity-time-display-is-off-by-5-hours
    Is this because of
    `$time_offset = $time + ( $root_blog_offset * 3600 );`


    mgkoller
    Participant

    @mgkoller

    I also noticed this in my settings, how can I make it so that the activity pulls from local time and not utc time (which makes it 5 hours off)

    `UTC time is 2012-09-25 17:44:21 Local time is 2012-09-25 12:44:21`


    mgkoller
    Participant

    @mgkoller

    Same thing happens when I run Buddypress on my localhost (MAMP) so I know its not a server problem. I assume `http:// “your web site” /wp-admin/admin.php?page=bp-activity ` is off by 5 hours for everybody else?


    r-a-y
    Keymaster

    @r-a-y

    Sounds like a bug.

    Can you post about this here?
    https://trac.buddypress.org/newticket

    Login with the same credentials you use on this site.


    mgkoller
    Participant

    @mgkoller

    Thanks @r-a-y
    https://buddypress.trac.wordpress.org/ticket/4573
    Let me know if I need to clear anything up.


    mgkoller
    Participant

    @mgkoller

    Hey, I just saw the reply to this ticket. (Sorry about the time it took to reply)
    Regarding
    https://buddypress.trac.wordpress.org/ticket/4573

    I’ve done several fresh installs of WordPress, then installing the BuddyPress plugin using (Mamp).
    Using WordPress 3.4.2. / BuddyPress Version 1.6.1
    When I post activity (either on my localhost or my live site)
    The Activity time is right BUT
    Several Hours are added when I visit the Activity panel inside my dashboard “wp-admin/admin.php?page=bp-activity”
    I use the dashboard Activity because of its search and dates.

    I would even assume it does this in http://testbp.org/activity/ but the Dashboard activity panel is hidden. Let me know if there are any fixes or if I need to re-clarify anything. Thanks for your help!


    mgkoller
    Participant

    @mgkoller

    To clear things up the div class inside the “dashboard > Activity” is

    `


    wpmirwin
    Participant

    @wpmirwin

    Hi there… I’ve racked my brain over a very similar issue. I’m wondering if you had any luck finding the answer?

    This is what I’m seeing.

    1). From what I can tell (I used shared hosting), the Centos Linux box that hosts my site has the date/time set correctly.

    I asked them to issue the date command and send the result. What they provided was the result when logging into the box via SSH. i.e. “Sun Jan 27 10:45:24 CST 2013”. The server is hosted somewhere in the CST timezone, and the date/time was correct at the time this info was sent.

    2). I am in the EST time zone. My WP general/settings/timezone is set to Montreal.

    3). When I publish a WP Post (for example) everything is fine. The “published on” date/time is correct (in local / EST / Montreal time). In fact, everything to do with straight WP date/time related handling is fine. BuddyPress is a different story!

    4). BuddyPress: When someone sends a private message, the time on the received email is one hour behind. I assume this can be explained by the CST server time and the EST timezone I’ve chosen in WP Settings/General/timezone. I can live with this – Or could change the timezone to the server timezone (chicago / CST).

    This is where it gets interesting.

    5). BuddyPress: When somebody creates or adds to a topic in BuddyPress Group Forum, the date/time is also correct. i.e. “username said n seconds ago” is 1 second after the update is made. OK.. But, the corresponding Activity entry shows 5 hours and 1 second ago. i.e. 5 hours in the past!

    Looking at the Activity Table record via phpMyAdmin, the date is stored in GMT (i.e. + 5 hours as I am in EST).

    Looking at the Topics Table record via phpyMyAdmin, the date is exactly the same – i.e. stored in GMT.

    So, when the forum topic is displayed, it’s doing a proper conversion from GMT to local time (-5), but the Activity Stream page seems to be doing the conversion twice, and I end up with -10 hours from the stored time in GMT.

    6). BuddyPress: Of course, when somebody just posts something to the activity stream, it always shows up as “username said 5 hours and n seconds ago” also. i.e. a -10 conversion from the stored db time which is in GMT.

    7). BuddyPress: Finally, when looking at the Activity via WP Admin, the date/time on each entry is straight out of the DB – i.e. GMT time – No local time conversion at all!

    So in Summary:

    Server setting for date/time is ok
    Straight WP handling of date/time is ok
    date/time is stored at the DB in GMT in all cases
    date/time is converted properly based on timezone for the BuddyPress Group forum topic itself (-5)
    date/time seems to be converted twice (-10) for the corresponding BuddyPress Activity Stream record as seen by the end user
    date/time is not converted at all when viewed via WP Admin. i.e. it is straight GMT

    If anybody can make sense of what’s going on, I’d really appreciate it! I’ve looked through everything I can find and just cant figure this out.

    Best regards,
    Mike.

    NOTE: Maybe it’s not good that I added to this post? It’s a similar problem, but not exactly the same. I can create a new post if that’s best.


    wpmirwin
    Participant

    @wpmirwin

    Sorry, Forgot to mention the versions.

    WP: 3.4.2
    BP: 1.6.1

    Mike.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Buddypress Activity Time is off by 5 hours’ is closed to new replies.
Skip to toolbar