MCPcopy Index your code
hub / github.com/riverqueue/river / timeString

Function timeString

riverdriver/riversqlite/river_sqlite_driver.go:1667–1676  ·  view source on GitHub ↗
(t time.Time)

Source from the content-addressed store, hash-verified

1665}
1666
1667func timeString(t time.Time) string {
1668 // SQLite times are really strings, and may god help your immortal soul if
1669 // you don't use this exact format when storing them (including similar
1670 // looking more common formats like RFC3339). They'll store fine, produce no
1671 // warnings, and then just won't compare properly against built-ins, causing
1672 // everything to fail in non-obvious ways.
1673 const sqliteFormat = "2006-01-02 15:04:05.999"
1674
1675 return t.UTC().Round(time.Millisecond).Format(sqliteFormat)
1676}
1677
1678// This is kind of unfortunate, but I've found it the easiest way to encode an
1679// optional date/time. Unfortunately sqlc (or the driver? not sure) will write a

Callers 7

JobDeleteBeforeMethod · 0.85
JobGetStuckMethod · 0.85
LeaderAttemptReelectMethod · 0.85
LeaderResignMethod · 0.85
timeStringNullableFunction · 0.85
TestTimeStringFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestTimeStringFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…