[go: up one dir, main page]

Skip to content

Inconsistency in handling dates in the commit log screen

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

The Code > Commits for each project shows the commit history and the date each commit was created. However, the dates displayed on this screen are inconsistent with the red and blue-marked parts of the attached image.

image.png

The red-marked date in the above screenshot follows:

  • Timezone that defined in the User's timezone (Profile icon > Edit profile > Time settings)
  • If the user's timezone is blank, instance's timezone (gitlab_rails['time_zone'] in gitlab.rb)

On the other hands, the blue-marked date follows the local timezone that retrieved by the browser. (Therefore, if we change the time zone in the OS settings, the time zone displayed here will also change.)

image.png

image.png

Therefore, if the timezone in the following settings differ, the date display may be inconsistent, as shown below.

  • Timezone in the user's settings (if it is blank, Instance's timezone)
  • User's actual location (User device's system locale)

image.png

Steps to reproduce

  • Create project
  • Push commits to the project
  • Change timezones in:
    • User's settings (Profile icon > Edit profile > Time settings)
    • System locale of the device/browser

Example Project

It is not possible to create a sample project for this issue because it depends on the user's settings.

What is the current bug behavior?

There is consistency in the timezone on each page, so a commit on March 19th will not be displayed in the “March 18th” section, as in the example above.

What is the expected correct behavior?

A commit on March 19th is sometimes displayed in the “March 18th” section, as in the example above.

Relevant logs and/or screenshots

Please see the above screenshots

Output of checks

This bug happens on GitLab.com

Possible fixes

Edited by 🤖 GitLab Bot 🤖