1 package utils 2 3 import ( 4 "context" 5 "time" 6 ) 7 8 func LocalTime(ctx context.Context) (time.Time, error) { 9 loc, err := time.LoadLocation("Europe/London") 10 if err != nil { 11 return time.Now(), err 12 } 13 now := time.Now().In(loc) 14 return now, nil 15 } 16