Uploaded image for project: 'FishEye'
  1. FishEye
  2. FE-6489

Incorrect time displayed for users with default timezone in their user profile

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 4.0.4, 4.1.0
    • 4.0.0, 4.0.3
    • None

    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

      1. Create two users in FishEye
        1. test_emptytimezone without an explicitly set timezone option in his user profile
        2. test_settimezone with an explicitly set timezone (equal to the default one) in his user profile
        3. These are the setting of the two users in FishEye in the cruuser table
      2. 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.

      1. Identify the users to be updated
        SELECT * 
        FROM cru_user_profile
        WHERE cru_timezone is NULL OR  cru_timezone = '';
        
      2. 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 = '';
        

      Attachments

        1. FE6489_ActivityStream_correct.png
          FE6489_ActivityStream_correct.png
          43 kB
        2. FE6489_ActivityStream_incorrect.png
          FE6489_ActivityStream_incorrect.png
          43 kB
        3. FE6489_cruuser_table.png
          FE6489_cruuser_table.png
          7 kB
        4. screenshot-1.png
          screenshot-1.png
          116 kB
        5. screenshot-2.png
          screenshot-2.png
          22 kB
        6. screenshot-3.png
          screenshot-3.png
          21 kB

        Issue Links

          Activity

            People

              pswiecicki Piotr Swiecicki
              ccurti Caterina Curti
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: