add payment years to expiration date, not now

This commit is contained in:
Joerg Lehmann 2022-09-15 18:17:15 +02:00
parent 6fe448e3e2
commit 1f1e34e213
1 changed files with 1 additions and 5 deletions

View File

@ -383,11 +383,7 @@ func prolongActivation(deveui string, years int) (string, error) {
fmt.Println(t.Unix())
var t_new time.Time
if t.Before(time.Now()) {
t_new = time.Now().AddDate(years, 0, 0)
} else {
t_new = t.AddDate(years, 0, 0)
}
t_new = t.AddDate(years, 0, 0)
active_until_new := t_new.Format(layout)
// SET object