remove UTC from some not store related operations

This commit is contained in:
Pascal Fischer
2023-04-10 10:54:23 +02:00
parent 489892553a
commit 6aba28ccb7
14 changed files with 24 additions and 24 deletions

View File

@@ -50,7 +50,7 @@ func NewNetwork() *Network {
n := iplib.NewNet4(net.ParseIP("100.64.0.0"), NetSize)
sub, _ := n.Subnet(SubnetSize)
s := rand.NewSource(time.Now().UTC().Unix())
s := rand.NewSource(time.Now().Unix())
r := rand.New(s)
intn := r.Intn(len(sub))
@@ -101,7 +101,7 @@ func AllocatePeerIP(ipNet net.IPNet, takenIps []net.IP) (net.IP, error) {
}
// pick a random IP
s := rand.NewSource(time.Now().UTC().Unix())
s := rand.NewSource(time.Now().Unix())
r := rand.New(s)
intn := r.Intn(len(ips))