summaryrefslogtreecommitdiff
path: root/internal/discovery/discovery.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-11-24 15:16:06 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-11-24 15:16:06 +0100
commit5d10e7b2e85b89cb087493279d9c5c9420f0b1e2 (patch)
treef0a63e1bc4f6b46513324f1ad2833102a285889a /internal/discovery/discovery.go
parentf0ec0be5e833f72fc650ce9d093722838e4f8034 (diff)
Util: Get rid of current time helper
Fixes #5
Diffstat (limited to 'internal/discovery/discovery.go')
-rw-r--r--internal/discovery/discovery.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/discovery/discovery.go b/internal/discovery/discovery.go
index d639406..60f30e3 100644
--- a/internal/discovery/discovery.go
+++ b/internal/discovery/discovery.go
@@ -155,7 +155,7 @@ func (discovery *Discovery) DetermineServersUpdate() bool {
}
// 1 hour from the last update
should_update_time := discovery.Servers.Timestamp.Add(1 * time.Hour)
- now := util.GetCurrentTime()
+ now := time.Now()
return !now.Before(should_update_time)
}
@@ -173,7 +173,7 @@ func (discovery *Discovery) GetOrganizationsList() (*types.DiscoveryOrganization
bodyErr,
)
}
- discovery.Organizations.Timestamp = util.GetCurrentTime()
+ discovery.Organizations.Timestamp = time.Now()
return &discovery.Organizations, nil
}
@@ -192,7 +192,7 @@ func (discovery *Discovery) GetServersList() (*types.DiscoveryServers, error) {
)
}
// Update servers timestamp
- discovery.Servers.Timestamp = util.GetCurrentTime()
+ discovery.Servers.Timestamp = time.Now()
return &discovery.Servers, nil
}