MCPcopy Create free account
hub / github.com/bywwcnll/StreamPanel / formatTime

Function formatTime

devtools/modules/utils.js:45–55  ·  view source on GitHub ↗
(timestamp)

Source from the content-addressed store, hash-verified

43}
44
45export function formatTime(timestamp) {
46 const date = new Date(timestamp);
47 const timeStr = date.toLocaleTimeString('en-US', {
48 hour12: false,
49 hour: '2-digit',
50 minute: '2-digit',
51 second: '2-digit'
52 });
53 const milliseconds = String(date.getMilliseconds()).padStart(3, '0');
54 return `${timeStr}.${milliseconds}`;
55}
56
57export function formatTimestampForExport(timestamp) {
58 const date = new Date(timestamp);

Callers 1

createMessageRowFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected