Skip to content

Commit 308a15b

Browse files
committed
fix: details tab duration pod
1 parent 61c91ad commit 308a15b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/camel-app-details/CamelAppStatusPod.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ const CamelAppStatusPod: React.FC<CamelAppStatusPodProps> = ({ obj: camelInt, po
4040
const { t } = useTranslation('plugin__camel-openshift-console-plugin');
4141
// Golang time.Time is in nanoseconds
4242
// TODO: add tooltip with date
43-
const durationFull = formatDuration(Date.parse(camelPod.uptimeTimestamp) / 1000000, {
43+
const now = Date.now();
44+
const uptimeTimestamp = Date.parse(camelPod.uptimeTimestamp);
45+
const duration = now - uptimeTimestamp;
46+
const durationFull = formatDuration(duration, {
4447
omitSuffix: false,
4548
});
4649

0 commit comments

Comments
 (0)