mirror of
https://github.com/Xevion/banner.git
synced 2026-01-31 08:23:35 -06:00
Use central time for zerolog's timestamp acquisition
This commit is contained in:
@@ -31,6 +31,11 @@ var (
|
|||||||
func init() {
|
func init() {
|
||||||
ctx = context.Background()
|
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
|
// Try to grab the environment variable, or default to development
|
||||||
environment = GetFirstEnv("ENVIRONMENT", "RAILWAY_ENVIRONMENT")
|
environment = GetFirstEnv("ENVIRONMENT", "RAILWAY_ENVIRONMENT")
|
||||||
if environment == "" {
|
if environment == "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user