mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
simplify TimeNow parsing for ee metrics
This commit is contained in:
committed by
Dan Christian Bogos
parent
172e846d3f
commit
132aecd3c1
@@ -137,7 +137,6 @@ func composeExp(fields []*config.FCTemplate, cgrEv *utils.CGREvent, dc utils.Dat
|
||||
}
|
||||
|
||||
func newEEMetrics(location string) (*utils.SafeMapStorage, error) {
|
||||
tNow := time.Now()
|
||||
loc, err := time.LoadLocation(location)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -146,8 +145,7 @@ func newEEMetrics(location string) (*utils.SafeMapStorage, error) {
|
||||
utils.NumberOfEvents: int64(0),
|
||||
utils.PositiveExports: utils.StringSet{},
|
||||
utils.NegativeExports: utils.StringSet{},
|
||||
utils.TimeNow: time.Date(tNow.Year(), tNow.Month(), tNow.Day(),
|
||||
tNow.Hour(), tNow.Minute(), tNow.Second(), tNow.Nanosecond(), loc),
|
||||
utils.TimeNow: time.Now().In(loc),
|
||||
}}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user