Relative Time of Due Date in Issue Boards is not Correct

Summary

If a due date is configured for an issue, it's relative time is not displayed correctly. The date is off-by-one day. I suspect that GitLab isn't using the correct system time zone.

Because the relative remaining time is wrongly calculated, the due day is presented as e.g. Monday, while the due date is set to Tuesday!

Steps to reproduce

Create an issue and set the due date to +2 days:

  • today = 10.03.2019 - 14:04 (Sunday)
  • due date = 12.03.2019 (Tuesday)

Open the issue board to view the issue card.

Example Project

No example project provided. The issue can easily be reproduced.

What is the current bug behavior?

The issue shows "due Monday" and the tool tip 1 day remaining. Because the relative remaining time is wrongly calculated, the due day is presented as Monday, but the due date is on Tuesday!

What is the expected correct behavior?

As today is Sunday and the due date is Tuesday, we have 2 remaining days. Moreover, the due day is shown as Monday.

Relevant logs and/or screenshots

image

Possible fixes

This is another issue of many (I already reported some...) of GitLab doing wrong relative date and time calculations!

  1. Please review all relative time calculations in GitLab.
  2. Check if you adhere to the systems local time zone.
  3. Check relative time calculations for off-by-one errors.
  4. The due day name must be based on the due date not on the relative remaining time!
Assignee Loading
Time tracking Loading