mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 16:48:45 +05:00
Add ability to ERS to update or move ERS SQL events to a new table & add *export flag for ERS readers
This commit is contained in:
committed by
Dan Christian Bogos
parent
a2b86e1a02
commit
d35b14b6b9
@@ -294,6 +294,13 @@ func ParseTimeDetectLayout(tmStr string, timezone string) (time.Time, error) {
|
||||
} else {
|
||||
return time.Now().Add(tmStrTmp), nil
|
||||
}
|
||||
case strings.HasPrefix(tmStr, "-"):
|
||||
tmStr = strings.TrimPrefix(tmStr, "-")
|
||||
if tmStrTmp, err := time.ParseDuration(tmStr); err != nil {
|
||||
return nilTime, err
|
||||
} else {
|
||||
return time.Now().Add(-tmStrTmp), nil
|
||||
}
|
||||
case utcFormat.MatchString(tmStr):
|
||||
return time.ParseInLocation("2006-01-02T15:04:05", tmStr, loc)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user