"Last activity" date in users view lags by one day, but is accurate in audit events
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
The "Last activity" as a field in Admin area > Users lags by one day, but date and time given in Admin area > Monitoring > Audit Events shows correct information.
Steps to reproduce
- Sign in to GitLab instance as administrator user
- In a separate browser or private tab, sign in as another user
- In initial window in which you are signed in as admin, compare
Last activityof the user in Users view to the data in Audit Events
I have reproduced the reported behavior on the latest patch release of each minor release from 14.2 to 14.6:
- 14.2.7
- 14.3.6
- 14.4.5
- 14.5.3
- 14.6.3
Note that this is likely related to #335298, but this presents differently than the linked issue.
What is the current bug behavior?
Audit events record correct date and time, but Users view reports last activity as the day before. (Current date -1)
What is the expected correct behavior?
Last Access column in Users view ought to report the correct date of last access.
Relevant logs and/or screenshots
1. Audit events: Correct sign-in date, Jan 26, for Brad Sevy.
2. Users view reports last access as yesterday, Jan 25.
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)(we will only investigate if the tests are passing)

