Files
popertotsandSisyphus e86248b27c refactor: move auth, GDPR, and booking cleanup to centralized scheduler
Convert CleanupRevokedJTIs to return (int, error) and remove StartJTICleanup goroutine. Add CleanupStaleLoginEntries and CleanupGDPRExportCache for centralized scheduler. Add clock.London timezone location.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-07 00:10:00 +01:00

25 lines
928 B
Go

// Package clock provides the single source of truth for time across the
// application. All wall-clock operations use Now() for UTC consistency with
// the database. LondonLocation provides Europe/London for cron schedules and
// scheduling calculations that depend on local business-closing rules.
package clock
import "time"
// Now returns the current UTC time, used everywhere for wall-clock consistency.
// All scheduling comparisons, timestamp recording, and duration calculations use
// this function so they're consistent with the database (TIMESTAMPTZ in UTC).
func Now() time.Time {
return time.Now().UTC()
}
// London is the Europe/London timezone location, used for cron schedules and
// business-closing calculations.
var London = func() *time.Location {
loc, err := time.LoadLocation("Europe/London")
if err != nil {
panic("clock: failed to load Europe/London timezone: " + err.Error())
}
return loc
}()