diff --git a/src/app/components/user-profile/UserHero.tsx b/src/app/components/user-profile/UserHero.tsx index 232bdb0b..296f0c55 100644 --- a/src/app/components/user-profile/UserHero.tsx +++ b/src/app/components/user-profile/UserHero.tsx @@ -166,7 +166,8 @@ export function UserTimezone({ timezone }: { timezone: string }) { - {time} local time{offset ? ` · ${offset}` : ` · ${timezone}`} + {time} local time · {timezone} + {offset ? ` (${offset})` : ''} ); diff --git a/src/app/hooks/useUserProfile.ts b/src/app/hooks/useUserProfile.ts index 22de76fb..a24d12e8 100644 --- a/src/app/hooks/useUserProfile.ts +++ b/src/app/hooks/useUserProfile.ts @@ -60,7 +60,7 @@ export const useUserProfile = (userId: string): UserProfile | undefined => { bannerUrl: ObjectReader.string(profile, 'm.banner_url') ?? ObjectReader.string(profile, 'chat.commet.profile_banner'), - timezone: ObjectReader.string(profile, 'm.tz'), + timezone: ObjectReader.string(profile, 'm.tz')?.replace(/"/g, ''), // some client add quotes in timezone pronouns: Array.isArray(pronouns) ? pronouns?.map((p) => ({ grammaticalGender: ObjectReader.string(p, 'grammatical_gender'),