Skip to content

Conversation

@ZogStriP
Copy link
Member

Previously, local dates in posts used the browser's timezone (via
moment.tz.guess()) while the bookmark "Date in post" option used the
user's profile timezone. This caused a mismatch when a user's browser
timezone differed from their profile setting.

For example, a user with their profile set to "Asia/Singapore" but
browser in UTC would see an event displayed as "7:19 AM" in the post,
but the bookmark dialog would show "2:19 PM" for the same event.

Now all local date displays consistently use the user's profile
timezone when available, falling back to moment.tz.guess() only for
anonymous users or when no profile timezone is set.

Internal ref - t/170851

BEFORE

BEFORE.mov

AFTER

AFTER.mov

  Previously, local dates in posts used the browser's timezone (via
  moment.tz.guess()) while the bookmark "Date in post" option used the
  user's profile timezone. This caused a mismatch when a user's browser
  timezone differed from their profile setting.

  For example, a user with their profile set to "Asia/Singapore" but
  browser in UTC would see an event displayed as "7:19 AM" in the post,
  but the bookmark dialog would show "2:19 PM" for the same event.

  Now all local date displays consistently use the user's profile
  timezone when available, falling back to moment.tz.guess() only for
  anonymous users or when no profile timezone is set.

  Internal ref - t/170851
@github-actions github-actions bot added chat PRs which include a change to Chat plugin discourse-local-dates labels Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chat PRs which include a change to Chat plugin discourse-local-dates

Development

Successfully merging this pull request may close these issues.

3 participants