MCPcopy Index your code
hub / github.com/dnote/dnote / FormatTS

Function FormatTS

pkg/server/presenters/helpers.go:24–26  ·  view source on GitHub ↗

FormatTS rounds up the given timestamp to the microsecond so as to make the times in the responses consistent

(ts time.Time)

Source from the content-addressed store, hash-verified

22// FormatTS rounds up the given timestamp to the microsecond
23// so as to make the times in the responses consistent
24func FormatTS(ts time.Time) time.Time {
25 return ts.UTC().Round(time.Microsecond)
26}

Callers 6

TestFormatTSFunction · 0.85
TestPresentNoteFunction · 0.85
TestPresentBookFunction · 0.85
TestPresentBooksFunction · 0.85
PresentBookFunction · 0.85
PresentNoteFunction · 0.85

Calls

no outgoing calls

Tested by 4

TestFormatTSFunction · 0.68
TestPresentNoteFunction · 0.68
TestPresentBookFunction · 0.68
TestPresentBooksFunction · 0.68