Showing a user’s local time on their profile card
A small component that shows a member's local time on their user card, if they've set a timezone. Useful in communities spread across many timezones.
api.decorateUserCard((card, user) => {
if (!user.timezone) return;
const time = new Intl.DateTimeFormat([], {
hour: "2-digit", minute: "2-digit", timeZone: user.timezone,
}).format(new Date());
card.addLine(`Local time: ${time}`);
});Install it from the repository link in the component settings.
Created
Last reply
3
Replies
471
Views
3
Users
33
Likes
Related topics
- Should LLM-written themes and plugins carry a label?8 replies
- Composer keeps switching back to markdown mode3 replies
- What’s the best way to run a weekly AMA?2 replies
- Adding a banner above the topic list with a theme component2 replies
- Reaction counts look wrong after merging two topics1 reply
- A quieter "new topic" indicator2 replies