improve timezone

This commit is contained in:
Ajay Bura 2026-07-23 10:28:26 +05:30
commit 4fc9619636
2 changed files with 3 additions and 2 deletions

View file

@ -166,7 +166,8 @@ export function UserTimezone({ timezone }: { timezone: string }) {
<Box as="span" alignItems="Center" gap="100">
<Icon style={{ opacity: config.opacity.P300 }} size="50" src={Icons.Clock} />
<Text as="span" size="T200" priority="300" truncate>
{time} local time{offset ? ` · ${offset}` : ` · ${timezone}`}
{time} local time · {timezone}
{offset ? ` (${offset})` : ''}
</Text>
</Box>
);

View file

@ -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'),