mirror of
https://github.com/Xevion/banner.git
synced 2025-12-09 14:06:34 -06:00
Use central time for zerolog's timestamp acquisition
This commit is contained in:
5
main.go
5
main.go
@@ -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 == "" {
|
||||
|
||||
Reference in New Issue
Block a user