Opened 6 years ago
Last modified 6 months ago
#7911 new defect (bug)
Activity dashboard: Wrong date being displayed
Reported by: | groston | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Contributions | Priority: | low |
Severity: | minor | Version: | 2.9.3 |
Component: | Activity | Keywords: | |
Cc: |
Description
I believe that there is a bug in the Activity dashboard, i.e., the page that can be accessed by administrators that shows all of the site’s activity.
Looking at the feed, I see an activity that was posted ‘2 hours ago’, i.e., around 10:45 am ish EDT. (NOTE: when I did this test, the local date was one day behind the GMT date.) The activity list shows that this activity occurred at 9:27 am – this could be a daylight savings issue, not big deal.
The second activity in the feed occurred ’15 hours ago’, i.e., around 9:00 pm ish yesterday evening. However, the activity list show this activity ‘occurred’ at 8:52 pm 1 Jul, i.e., eight hours in the future! In other words, the date shown in the activity list is off by one day.
In fact, the date for all activities in the list from the one cited above through one posted at 7:43 pm yesterday are off by a day.
I just looked in the database and I know why this error is occurring. The records in the database are stored using GMT. Thus, the code that creates the activity list seems to be grabbing the date from the GMT value and not the date of the local time.
So, I amend my opening statement – this is clearly a bug. My guess is that someone who know this code should be able to fix the issue easily – probably one line of code…
@r-a-y Do you recall any specifics about how that time javascript we added dealt with timezones? I'm wondering if this relates to that part of the code.