Use central time for zerolog's timestamp acquisition

This commit is contained in:
2023-12-26 07:56:13 -06:00
parent 861870f821
commit 14295d1264

View File

@@ -31,6 +31,11 @@ var (
func init() {
ctx = context.Background()
// Set zerolog's timestamp function to use the central timezone
zerolog.TimestampFunc = func() time.Time {
return time.Now().In(CentralTime)
}
// Try to grab the environment variable, or default to development
environment = GetFirstEnv("ENVIRONMENT", "RAILWAY_ENVIRONMENT")
if environment == "" {