Activity Time is GMT. Activity Stream "Posted an Update" time is incorrect.
Sorry for the subject – not enough room to describe what this is all about. I’m having issues with the way BuddyPress converts/displays date/time in various places. I have read everything I can find here on buddypress.org, but nothing has been helpful so far.
Here is the summary
* WP: 3.4.2
* BP: 1.6.1
* Server setting for date/time is ok
* Straight WP handling of date/time is ok (i.e. new posts have the correct date/time, etc)
* date/time is stored at the DB in GMT in all cases (this date/time is always correct in GMT)
* date/time is converted properly based on timezone for the BuddyPress Group forum topic itself. i.e. “user said 5 days, 8 hours ago:” – this is correct. (-5 for me .. EST)
* 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 for the same Activity Stream record when viewed via WP Admin. i.e. the time is straight GMT from the DB.
Here are the details:
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!
If anybody can make sense of what’s going on, I’d really appreciate it! I will provide any information that you need and access to the system if required.
NOTE: I replied to another topic with these same questions here:
I’m not try to post this all over the place, I just want to make sure it’s in the right place!
- The topic ‘Activity Time is GMT. Activity Stream "Posted an Update" time is incorrect.’ is closed to new replies.