MCPcopy Create free account
hub / github.com/ShipSecAI/studio / formatTimestamp

Function formatTimestamp

frontend/src/pages/IntegrationsManager.tsx:37–54  ·  view source on GitHub ↗
(iso: string | null | undefined)

Source from the content-addressed store, hash-verified

35type IntegrationConnection = components['schemas']['IntegrationConnectionResponse'];
36
37function formatTimestamp(iso: string | null | undefined): string {
38 if (!iso) {
39 return '—';
40 }
41
42 try {
43 return new Intl.DateTimeFormat('en-US', {
44 month: 'short',
45 day: 'numeric',
46 year: 'numeric',
47 hour: '2-digit',
48 minute: '2-digit',
49 }).format(new Date(iso));
50 } catch (error) {
51 console.error('Failed to format timestamp', error);
52 return iso;
53 }
54}
55
56function getProviderConnection(
57 providerId: string,

Callers 2

IntegrationsManagerFunction · 0.70
ProviderConfigDialogFunction · 0.70

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected