Skip to content

Commit

Permalink
fix: switch to UTC on every check
Browse files Browse the repository at this point in the history
  • Loading branch information
MacLikorne committed Jan 25, 2022
1 parent 22b5ad7 commit 98c055d
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions charts/pleco/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ name: pleco
description: Automatically removes Cloud managed services and Kubernetes resources based on tags with TTL
type: application
home: https://github.com/Qovery/pleco
version: 0.9.35
appVersion: 0.9.35
version: 0.9.36
appVersion: 0.9.36
icon: https://github.com/Qovery/pleco/raw/main/assets/pleco_logo.png
2 changes: 1 addition & 1 deletion charts/pleco/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ replicaCount: 1
image:
repository: qoveryrd/pleco
pullPolicy: IfNotPresent
plecoImageTag: "0.9.35"
plecoImageTag: "0.9.36"

cloudProvider: ""

Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ func init() {
}

func GetCurrentVersion() string {
return "0.9.35" // ci-version-check
return "0.9.36" // ci-version-check
}
2 changes: 1 addition & 1 deletion pkg/common/minio.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func GetExpiredBuckets(bucketApi *minio.Client, tagName string, region string) [

expiredBuckets := []MinioBucket{}
for _, bucket := range buckets {
if bucket.CreationDate.Add(2*time.Hour).Before(time.Now()) {
if bucket.CreationDate.UTC().Add(2 * time.Hour).Before(time.Now().UTC()) {
expiredBuckets = append(expiredBuckets, bucket)
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/do/volumes_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func getDetachedVolumes(client *godo.Client, region string) []DOVolume {

detachedVolumes := []DOVolume{}
for _, volume := range volumes {
if volume.CreationDate.Add(volumeTimeout() * time.Hour).Before(time.Now()) {
if volume.CreationDate.UTC().Add(volumeTimeout() * time.Hour).Before(time.Now().UTC()) {
detachedVolumes = append(detachedVolumes, volume)
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/scaleway/cr_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func getEmptyRegistries(registryAPI *registry.API) ([]*registry.Namespace, strin

emptyRegistries := []*registry.Namespace{}
for _, reg := range registries {
if reg.ImageCount == 0 && reg.CreatedAt.Add(time.Hour).After(time.Now()) {
if reg.ImageCount == 0 && reg.CreatedAt.UTC().Add(time.Hour).After(time.Now().UTC()) {
emptyRegistries = append(emptyRegistries, reg)
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/scaleway/volumes_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func getDetachedVolumes(volumeAPI *instance.API, zone string) []ScalewayVolume {

detachedVolumes := []ScalewayVolume{}
for _, volume := range volumes {
if volume.UpdatedAt.Add(volumeTimeout()*time.Hour).Before(time.Now()) && volume.ServerId == "null" {
if volume.UpdatedAt.UTC().Add(volumeTimeout()*time.Hour).Before(time.Now().UTC()) && volume.ServerId == "null" {
detachedVolumes = append(detachedVolumes, volume)
}
}
Expand Down

0 comments on commit 98c055d

Please sign in to comment.