Skip to content

feat: show local time on profiles, opt-in - #803

Merged
brendt merged 1 commit into
dev-null-sh:productionfrom
Taldres:feat/profile-local-time
Oct 22, 2026
Merged

brendt merged 1 commit into
dev-null-sh:productionfrom
Taldres:feat/profile-local-time

Conversation

@Taldres

@Taldres Taldres commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Profiles can now show the person's current local time next to their location and website, like GitHub does, e.g. 11:06 (UTC +02:00).

It is off by default. Settings → Timezone has a new checkbox, "Show my local time on my profile", which is only available while a timezone is set. Clearing the timezone turns it off, on the server too, so a profile never shows a time without a timezone behind it.

  • New users.show_local_time boolean, default false, saved together with the timezone through the existing PUT settings/timezone.
  • LocalTime renders nothing on the server and ticks every minute in the browser, so the server's clock is never shown as the reader's.
  • The offset comes from Intl, so it follows daylight saving time. A zone without an offset reads UTC.
  • The timezone itself was already public once set (tooltips show it). This only adds control over whether the profile shows the time.
  • The data export includes the new field. The knowledge base is updated.

Relates to #669, #737 (other open PRs on timezone and time formats). This reuses the timezone setting and does not touch their formatting.

Tests

  • Feature tests for the controller (opt in, opt out, no timezone, invalid value), the action, the export and the profile payload for guests.
  • A unit test for the UTC offset, including daylight saving time.
  • Checked by hand in the browser: checkbox disabled without a timezone, the save button enabling and disabling, the line on the profile, and unsetting the timezone.
  • composer test passes except the 100% coverage step, which needs a coverage driver I don't have locally.

Preview

Screenshot 2026-10-20 at 12 46 28 Screenshot 2026-10-20 at 12 43 43 Screenshot 2026-10-20 at 12 43 48

Adds a show_local_time setting next to the timezone. When on and a timezone is set, the profile shows the current time there with its UTC offset, like GitHub does. It is off by default and clearing the timezone turns it off.
@Taldres

Taldres commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Would you be interested in this opt-in local time feature for profiles? Happy to adjust the approach if you have a different direction in mind.

@xHeaven

xHeaven commented Oct 22, 2026

Copy link
Copy Markdown
Member

@nunomaduro I think this looks good, has a migration in it though so needs your call.

@brendt

brendt commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Since auto deploy is disabled, I'll merge this already and @nunomaduro you can take care of it when you're back

@brendt
brendt merged commit c7372de into dev-null-sh:production Oct 22, 2026
5 checks passed
@Taldres
Taldres deleted the feat/profile-local-time branch October 22, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants