Browse Source

Update inbound.go

fix expiry time
sprov 4 years ago
parent
commit
500b08b112
1 changed files with 1 additions and 1 deletions
  1. 1 1
      web/service/inbound.go

+ 1 - 1
web/service/inbound.go

@@ -167,7 +167,7 @@ func (s *InboundService) AddTraffic(traffics []*xray.Traffic) (err error) {
 
 func (s *InboundService) DisableInvalidInbounds() (int64, error) {
 	db := database.GetDB()
-	now := time.Now()
+	now := time.Now().Unix() * 1000
 	result := db.Model(model.Inbound{}).
 		Where("((total > 0 and up + down >= total) or (expiry_time > 0 and expiry_time <= ?)) and enable = ?", now, true).
 		Update("enable", false)