MCPcopy
hub / github.com/tinode/chat / InitTimes

Method InitTimes

server/store/types/types.go:388–393  ·  view source on GitHub ↗

InitTimes initializes time.Time variables in the header to current time.

()

Source from the content-addressed store, hash-verified

386
387// InitTimes initializes time.Time variables in the header to current time.
388func (h *ObjHeader) InitTimes() {
389 if h.CreatedAt.IsZero() {
390 h.CreatedAt = TimeNow()
391 }
392 h.UpdatedAt = h.CreatedAt
393}
394
395// MergeTimes intelligently copies time.Time variables from h2 to h.
396func (h *ObjHeader) MergeTimes(h2 *ObjHeader) {

Callers 12

largeFileReceiveHTTPFunction · 0.80
LargeFileReceiveMethod · 0.80
CreateMethod · 0.80
UpsertCredMethod · 0.80
CreateMethod · 0.80
CreateP2PMethod · 0.80
CreateMethod · 0.80
SaveMethod · 0.80
DeleteListMethod · 0.80
initUsersFunction · 0.80
initCredsFunction · 0.80
initMessagesFunction · 0.80

Calls 2

TimeNowFunction · 0.85
IsZeroMethod · 0.45

Tested by

no test coverage detected