Skip to content

Commit e63a314

Browse files
authored
fix(preprod): Format timezone to user prefs (#102128)
Resolves: EME-466 Currently: <img width="768" height="1412" alt="CleanShot 2025-10-27 at 10 19 25@2x" src="https://github.com/user-attachments/assets/1cce2020-c14f-4f68-8f71-61e3ddf0f9f1" /> After: (prefs set to UTC + 12 hour clock) <img width="3334" height="2190" alt="CleanShot 2025-10-27 at 10 20 07@2x" src="https://github.com/user-attachments/assets/84f7319d-dbc6-41bb-b19e-e7e8b5c0d11f" /> Adjust prefs: <img width="2242" height="700" alt="CleanShot 2025-10-27 at 10 20 42@2x" src="https://github.com/user-attachments/assets/dc324a49-6987-482d-9a4f-e44acff980ea" /> After new prefs: <img width="3334" height="2190" alt="CleanShot 2025-10-27 at 10 20 39@2x" src="https://github.com/user-attachments/assets/28604c7d-5f97-43d0-9fd1-fedae955f8bf" />
1 parent 2314480 commit e63a314

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

static/app/views/preprod/buildDetails/sidebar/buildDetailsSidebarAppInfo.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {Tooltip} from 'sentry/components/core/tooltip';
88
import {IconClock, IconFile, IconJson, IconLink, IconMobile} from 'sentry/icons';
99
import {t} from 'sentry/locale';
1010
import {formatBytesBase10} from 'sentry/utils/bytes/formatBytesBase10';
11-
import {getFormattedDate} from 'sentry/utils/dates';
11+
import {getFormat, getFormattedDate, getUtcToSystem} from 'sentry/utils/dates';
1212
import {unreachable} from 'sentry/utils/unreachable';
1313
import {openInstallModal} from 'sentry/views/preprod/components/installModal';
1414
import {
@@ -72,6 +72,11 @@ interface BuildDetailsSidebarAppInfoProps {
7272
export function BuildDetailsSidebarAppInfo(props: BuildDetailsSidebarAppInfoProps) {
7373
const labels = getLabels(props.appInfo.platform ?? undefined);
7474

75+
const datetimeFormat = getFormat({
76+
seconds: true,
77+
timeZone: true,
78+
});
79+
7580
return (
7681
<Flex direction="column" gap="xl">
7782
<Flex align="center" gap="sm">
@@ -135,7 +140,11 @@ export function BuildDetailsSidebarAppInfo(props: BuildDetailsSidebarAppInfoProp
135140
<IconClock />
136141
</InfoIcon>
137142
<Text>
138-
{getFormattedDate(props.appInfo.date_added, 'MM/DD/YYYY [at] hh:mm A')}
143+
{getFormattedDate(
144+
getUtcToSystem(props.appInfo.date_added),
145+
datetimeFormat,
146+
{local: true}
147+
)}
139148
</Text>
140149
</Flex>
141150
</Tooltip>

0 commit comments

Comments
 (0)