MCPcopy Index your code
hub / github.com/coder/coder / StartOfDay

Function StartOfDay

coderd/database/dbtime/dbtime.go:21–24  ·  view source on GitHub ↗

StartOfDay returns the first timestamp of the day of the input timestamp in its location.

(t time.Time)

Source from the content-addressed store, hash-verified

19
20// StartOfDay returns the first timestamp of the day of the input timestamp in its location.
21func StartOfDay(t time.Time) time.Time {
22 year, month, day := t.Date()
23 return time.Date(year, month, day, 0, 0, 0, 0, t.Location())
24}

Callers 3

TestGetUserStatusCountsFunction · 0.92
purgeChatsInTxMethod · 0.92

Calls 1

LocationMethod · 0.80

Tested by 1

TestGetUserStatusCountsFunction · 0.74