What's going on with Date columns, user and browser locales and timezones?

  • My locale is en-GB
  • My browser timezone is Europe/London
  • My MDC user timezone is set to (GMT+00:00) Edinburgh.

When I save a date in a date column, we get the following happening…

  • It is displayed as a Europe/London date “23 Jul, 12:00”

  • It is accessible from graphQL as a value of { "date": "2024-07-23", "time": "11:00:00", ... } and text as 2024-07-23 12:00

When I change my MDC user timezone to (GMT-09:00) Alaska things start getting weird:

  • It continues to be displayed as a Europe/London date “23 Jul, 12:00” though I’d expect “23 Jul, 03:00”
  • It is now accessible from graphQL as a value of { "date": "2024-07-23", "time": "11:00:00", ... } but with a different text as 2024-07-23 03:00

  • Is this a bug or expected behaviour?
  • Should the displayed date be based on the browser timezone, or the MDC user timezone?
  • Also, when programmatically saving dates to date columns, should developers save the date in UTC+0 timezone and let MDC do the rest?

Cc: @Matias.Monday

Expected.

  • API Text for date/time are in the configured mdc timezone of the token user.
  • The value (or fragment fields) are always returned in UTC.
  • When mutating a date column it must always be in the UTC. //rather are always treated as UTC by mdc - so use UTC to get expected results.
  • The display in the browser however, along with formulas is controlled by the local system timezone settings as far as I can tell.
  • And of course don’t forget Europe/London is currently in BST so it is UTC+1
1 Like