MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / formatAssistantPromptLocalDateTime

Function formatAssistantPromptLocalDateTime

src/core/bridge_coordinator.ts:15501–15513  ·  view source on GitHub ↗
(timestamp: number, timezone: string)

Source from the content-addressed store, hash-verified

15499}
15500
15501function formatAssistantPromptLocalDateTime(timestamp: number, timezone: string): string {
15502 const formatter = new Intl.DateTimeFormat('en-CA', {
15503 timeZone: timezone,
15504 year: 'numeric',
15505 month: '2-digit',
15506 day: '2-digit',
15507 hour: '2-digit',
15508 minute: '2-digit',
15509 second: '2-digit',
15510 hour12: false,
15511 });
15512 return `${formatter.format(new Date(timestamp))} ${timezone === 'Etc/UTC' ? 'UTC' : timezone}`;
15513}
15514
15515function normalizeAssistantPromptTimezone(timezone: string | null): string {
15516 const normalized = String(timezone ?? '').trim();

Calls

no outgoing calls

Tested by

no test coverage detected