Store only second timestamps, use UTC

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-11-29 17:33:41 +01:00
parent 02ec355192
commit 128eb0f8ba
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

@ -54,6 +54,7 @@ func checkForUpdates(ce *database.CatalogEntry) error {
ver, vertime, err := fetcher.Get(ce.Fetcher).FetchVersion(context.Background(), &ce.FetcherConfig)
ver = strings.TrimPrefix(ver, "v")
vertime = vertime.Truncate(time.Second).UTC()
switch {
@ -87,7 +88,7 @@ func checkForUpdates(ce *database.CatalogEntry) error {
}
cm.LastChecked = ptrTime(time.Now())
cm.LastChecked = ptrTime(time.Now().Truncate(time.Second).UTC())
return errors.Wrap(storage.Catalog.PutMeta(cm), "updating meta entry")
}