Skip to content

Commit

Permalink
use same time base for newDDBucket
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayan Samanta committed Mar 27, 2020
1 parent 4a89cd6 commit 2970e27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dynamodb/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,15 @@ type ddbBucket struct {
}

func newDDBBucket(name string, expiresIn time.Duration, ttl time.Duration) ddbBucket {
now := time.Now()
return ddbBucket{
ddbBucketStatePrimaryKey: ddbBucketStatePrimaryKey{
Name: name,
},
Expiration: time.Now().Add(expiresIn),
Expiration: now.Add(expiresIn),
Value: 0,
Version: 0,
TTL: time.Now().Add(ttl),
TTL: now.Add(ttl),
}
}

Expand Down

0 comments on commit 2970e27

Please sign in to comment.