add payment years to expiration date, not now
This commit is contained in:
parent
fb3e1dbe52
commit
44e6536c4f
|
|
@ -316,11 +316,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)
|
||||
}
|
||||
active_until_new := t_new.Format(layout)
|
||||
|
||||
// SET object
|
||||
|
|
|
|||
Loading…
Reference in New Issue