mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 12:25:53 +02:00
switch to utc time everywhere (#1167)
* switch to utc time everywhere Co-authored-by: alteredCoder <kevin@crowdsec.net>
This commit is contained in:
parent
b1a7ffb92f
commit
cc1ab8c50d
74 changed files with 1106 additions and 391 deletions
|
@ -20,16 +20,16 @@ func (t *Trigger) OnBucketPour(b *BucketFactory) func(types.Event, *Leaky) *type
|
|||
err := d.UnmarshalText([]byte(msg.MarshaledTime))
|
||||
if err != nil {
|
||||
log.Warningf("Failed unmarshaling event time (%s) : %v", msg.MarshaledTime, err)
|
||||
d = time.Now()
|
||||
d = time.Now().UTC()
|
||||
}
|
||||
l.logger.Debugf("yay timemachine overflow time : %s --> %s", d, msg.MarshaledTime)
|
||||
l.Last_ts = d
|
||||
l.First_ts = d
|
||||
l.Ovflw_ts = d
|
||||
} else {
|
||||
l.Last_ts = time.Now()
|
||||
l.First_ts = time.Now()
|
||||
l.Ovflw_ts = time.Now()
|
||||
l.Last_ts = time.Now().UTC()
|
||||
l.First_ts = time.Now().UTC()
|
||||
l.Ovflw_ts = time.Now().UTC()
|
||||
}
|
||||
l.Total_count = 1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue