mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-11-03 20:17:59 +00:00 
			
		
		
		
	Remove Unix() invocations on 'time.Time' objects and removed conversion of time to UTC
This commit is contained in:
		@@ -450,9 +450,9 @@ func (b *Backend) handleWALRollback(
 | 
			
		||||
	if age == 0 {
 | 
			
		||||
		age = 10 * time.Minute
 | 
			
		||||
	}
 | 
			
		||||
	minAge := time.Now().UTC().Add(-1 * age)
 | 
			
		||||
	minAge := time.Now().Add(-1 * age)
 | 
			
		||||
	if _, ok := req.Data["immediate"]; ok {
 | 
			
		||||
		minAge = time.Now().UTC().Add(1000 * time.Hour)
 | 
			
		||||
		minAge = time.Now().Add(1000 * time.Hour)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for _, k := range keys {
 | 
			
		||||
@@ -466,7 +466,7 @@ func (b *Backend) handleWALRollback(
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// If the entry isn't old enough, then don't roll it back
 | 
			
		||||
		if !time.Unix(entry.CreatedAt, 0).Before(minAge) {
 | 
			
		||||
		if !entry.CreatedAt.Before(minAge) {
 | 
			
		||||
			continue
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user