MCPcopy Create free account
hub / github.com/tiann/hapi / createTimestampForLogEntry

Function createTimestampForLogEntry

cli/src/ui/logger.ts:30–39  ·  view source on GitHub ↗
(date: Date = new Date())

Source from the content-addressed store, hash-verified

28}
29
30function createTimestampForLogEntry(date: Date = new Date()): string {
31 return date.toLocaleTimeString('en-US', {
32 timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
33 hour12: false,
34 hour: '2-digit',
35 minute: '2-digit',
36 second: '2-digit',
37 fractionalSecondDigits: 3
38 })
39}
40
41function getSessionLogPath(): string {
42 const timestamp = createTimestampForFilename()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected