Skip to content

Commit

Permalink
fixed - sub show time when "Start After First Use"
Browse files Browse the repository at this point in the history
  • Loading branch information
MHSanaei committed Jul 17, 2024
1 parent 4d4eef8 commit 7417c52
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sub/subService.go
Original file line number Diff line number Diff line change
Expand Up @@ -1023,10 +1023,9 @@ func (s *SubService) genRemark(inbound *model.Inbound, email string, extra strin
remark = append(remark, fmt.Sprintf("%dM⏳", minutes))
}
case exp < 0:
passedSeconds := now - exp
days := passedSeconds / 86400
hours := (passedSeconds % 86400) / 3600
minutes := (passedSeconds % 3600) / 60
days := exp / -86400
hours := (exp % -86400) / 3600
minutes := (exp % -3600) / 60
if days > 0 {
if hours > 0 {
remark = append(remark, fmt.Sprintf("%dD,%dH⏳", days, hours))
Expand Down

0 comments on commit 7417c52

Please sign in to comment.