Skip to content

Fix Timezone Inconsistencies in User Contribution Calendar

This MR fixes two annoying bugs in the user profile contribution calendar.

  1. The visible squares of the calendar graph rendered in the browser assumed the local time of the browser rather than that of the gitlab server. This meant that if you were located in US Pacific Time (UTC-8), and you performed an activity after 18:00 UTC, you would not see it represented in your calendar until after midnight local time because that square would not exist.

  2. The calendar data queried from the database was grouped by UTC date, irrespective of the Rails time_zone setting. If you wanted to run your GitLab instance in Melbourne, you'd have to deal with activity graphs that reflect contribution dates in UTC+0 time making it confusing to look at. Contributions made on a Monday would often look like they were made on Sunday if you contributed during normal business hours.

Closes #27616 (closed)

Merge request reports