Description
Summary
An incorrect time is displayed for users with default timezone in their user profile. The global server timezone is ignored and GMT time is displayed instead.
This affects various areas of the application, including:
- the Activity stream of a repository
Steps to Reproduce
- Create two users in FishEye
- test_emptytimezone without an explicitly set timezone option in his user profile
- test_settimezone with an explicitly set timezone (equal to the default one) in his user profile
- These are the setting of the two users in FishEye in the cruuser table
- Check the time on the Activity stream for a specific repository (the times indicated match the commit/push times)
Expected Results
The time of the repository operations (e.g. a push) is the same for both users.
Actual Results
The time of the repository operations (e.g. a push) is not the same for both users and is incorrect for the user without an explicitly set timezone (test_emptytimezone).
Notes
The problem occurs in the following conditions:
- when upgrading to version 4.0. ( As part of the upgrade to version 4.0, the cru_timezone column has been moved from the cru_user table to the cru_user_profile.)
- when creating the users directly in FishEye >= 4.0
Workaround
Explicitly set the timezone for the affected users.
Using the FishEye/Crucible user interface
Each user can set the Timezone option in his User Profile page.
Updating the timezone using a SQL command
Always back up your database before performing any modification to the database. If possible, try your modifications on a test server.
- Identify the users to be updated
SELECT * FROM cru_user_profile WHERE cru_timezone is NULL OR cru_timezone = '';
- Update them with the most common timezone for the users ('Australia/Sydney' in the example below)
UPDATE cru_user_profile SET cru_timezone='Australia/Sydney' WHERE cru_timezone is NULL OR cru_timezone = '';