Documentation
¶
Overview ¶
Package dbtime is the one format Haul uses for timestamps stored in SQLite TEXT columns.
Never bind a time.Time directly as a query argument: the SQLite driver stores it as time.Time.String() ("2026-11-18 17:26:54.587019257 +0000 UTC"), which is not RFC3339, doesn't round-trip through time.Parse with RFC3339, and is what Haul used to send to Pilot and Prism.
The stored format is fixed-width UTC with millisecond precision, "2006-01-02T15:04:05.000Z". It is valid RFC3339 (Go's time.RFC3339 and RFC3339Nano both parse it), it is exactly the ISO format every browser's Date parses, and because it is fixed-width it sorts correctly as text, so ORDER BY on these columns stays chronological.
Index ¶
Constants ¶
const Layout = "2006-01-02T15:04:05.000Z"
Layout is the stored format. Always UTC; the trailing Z is literal.
Variables ¶
This section is empty.
Functions ¶
func IsCanonical ¶
IsCanonical reports whether s is already in the stored format.
Types ¶
This section is empty.