Opened 15 years ago
Closed 15 years ago
#2238 closed defect (bug) (duplicate)
"sent X time ago" discrepancy in Sent Messages
Reported by: | 3sixty | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | major |
Severity: | Version: | ||
Component: | Activity | Keywords: | time zone, time, messages |
Cc: |
Description
DJPaul suggested posting this as a bug report. I can't get Messages to report "time ago" correctly without breaking the time reporting in the Forums. Out of the box, Forums are reporting times correctly ("Posted 2 seconds ago") but Messages report incorrectly ("Posted 5 hours ago"). In an attempt to fix this, I tried using date_default_timezone_set(); which fixed Messages, but it "broke" Forums - the times now say "Posted sometime ago".
I Ensured my WP install is set to use the same timezone as my server, but this seemed to have no effect.
In debugging, I sent a test Message that had a Sent Time of 2010-03-24 08:22:03 when UTC time is 2010-03-24 13:22:52 (5 hour difference).
Change History (3)
#2
@
15 years ago
I made some headway.
This my BP installation is on shared hosting, so the server time zone is different than the WP installation timezone. However, BP Messages is using the *server* time when it INSERTs the message record (bp-messages-classes.php). I detailed some more of the fix here:
PS. I was able to replicate this on a test install of BP on my own server, but not at testbp.org