Documentation
¶
Overview ¶
internal/clock/clock.go
Package clock declares gitback's two timestamp formats, so neither is ever hardcoded or re-decided ad hoc at a call site.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilenameUTC ¶
FilenameUTC formats t using filenameLayout, always in UTC regardless of t's own location — e.g. time.Now() at 11:26:16+05:30 becomes "2026-09-28T05-56-16Z".
Always UTC, deliberately: this format is used for machine-generated, embedded-in-a-filename timestamps (snapshot archive names, quarantine collision suffixes) where "lexical order == chronological order" is relied on elsewhere (ApplyRetention's snapshot pruning). Local time can move backward in wall-clock terms across a DST "fall back" transition, which would silently break that invariant; UTC has no DST, so it can't.
func LocalRFC3339 ¶
LocalRFC3339 formats t as local time in RFC3339, with a numeric UTC offset — e.g. "2026-09-28T11:26:16+05:30". Used for anything a person reads directly: structured log entries, gitback health's generated_at, mirrors.json's sync times.
Types ¶
This section is empty.