Skip to content

Commit

Permalink
Use <Time /> in Mapped Instance table (#23313)
Browse files Browse the repository at this point in the history
The start/end dates for a mapped instance weren't updating when a user changed their timezone. Using <Time /> fixes that

(cherry picked from commit 98ec8c6)
  • Loading branch information
bbovenzi authored and ephraimbuddy committed May 8, 2022
1 parent d81bf85 commit ee19458
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ import {
} from 'react-icons/md';

import { getMetaValue } from '../../../../utils';
import { formatDateTime, formatDuration, getDuration } from '../../../../datetime_utils';
import { formatDuration, getDuration } from '../../../../datetime_utils';
import { useMappedInstances } from '../../../api';
import { SimpleStatus } from '../../../StatusBox';
import Table from '../../../Table';
import Time from '../../../Time';

const renderedTemplatesUrl = getMetaValue('rendered_templates_url');
const logUrl = getMetaValue('log_url');
Expand Down Expand Up @@ -84,8 +85,8 @@ const MappedInstances = ({
</Flex>
),
duration: mi.duration && formatDuration(getDuration(mi.startDate, mi.endDate)),
startDate: mi.startDate && formatDateTime(mi.startDate),
endDate: mi.endDate && formatDateTime(mi.endDate),
startDate: <Time dateTime={mi.startDate} />,
endDate: <Time dateTime={mi.endDate} />,
links: (
<Flex alignItems="center">
<IconLink mr={1} title="Details" aria-label="Details" icon={<MdDetails />} href={detailsLink} />
Expand Down

0 comments on commit ee19458

Please sign in to comment.