improve timezone
This commit is contained in:
parent
758d328a39
commit
4fc9619636
2 changed files with 3 additions and 2 deletions
|
|
@ -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>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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'),
|
||||
|
|
|
|||
Loading…
Reference in a new issue