mattermost / focalboard

Focalboard is an open source, self-hosted alternative to Trello, Notion, and Asana.
https://www.focalboard.com
Other
20.72k stars 1.82k forks source link

Bug: Incorrect timezone used in rendering dates in board view #3219

Open humbled opened 2 years ago

humbled commented 2 years ago

Steps to reproduce the behaviour

  1. Be in timezone very different to USA or GMT (I am GMT+12)
  2. Add a date field to cards
  3. Set a date on one card
  4. Set the date field as visible on the board
  5. See the date different on the board to what was set on the card. In my case, renders on the board 1 day later than in the card.

Expected behaviour

The dates match

Screenshots (optional)

image

Edition and Platform

Additional context (optional)

Add any other context about the problem here, and any notes about the severity:

kamre commented 2 years ago

Hi @humbled, this issue can be reproduced by changing the location (and timezone) in Chrome Dev Tools.

@sbishel it looks like DateRange component used in the card dialog keeps the date in UTC so that server has UTC dates and client displays the date in local timezone.

But at the same time readonly date property type is rendered without any conversion from UTC to local timezone. This is the reason for the difference between the card dialog and kanban card.

wuwinson commented 2 years ago

Investigate - should we just show the same UTC date for everyone? Add time zone to all date properties? Auto-convert date/times based on local timezones? Investigate and clarify behavior.

humbled commented 11 months ago

Showing UTC datetime would be a subpar user experience IMHO. If you mean show localised time but UTC date - that would be even worse and plain wrong.