mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
fixed - sub show time when "Start After First Use"
This commit is contained in:
parent
4d4eef8d8a
commit
7417c52c8f
1 changed files with 3 additions and 4 deletions
|
@ -1023,10 +1023,9 @@ func (s *SubService) genRemark(inbound *model.Inbound, email string, extra strin
|
||||||
remark = append(remark, fmt.Sprintf("%dM⏳", minutes))
|
remark = append(remark, fmt.Sprintf("%dM⏳", minutes))
|
||||||
}
|
}
|
||||||
case exp < 0:
|
case exp < 0:
|
||||||
passedSeconds := now - exp
|
days := exp / -86400
|
||||||
days := passedSeconds / 86400
|
hours := (exp % -86400) / 3600
|
||||||
hours := (passedSeconds % 86400) / 3600
|
minutes := (exp % -3600) / 60
|
||||||
minutes := (passedSeconds % 3600) / 60
|
|
||||||
if days > 0 {
|
if days > 0 {
|
||||||
if hours > 0 {
|
if hours > 0 {
|
||||||
remark = append(remark, fmt.Sprintf("%dD,%dH⏳", days, hours))
|
remark = append(remark, fmt.Sprintf("%dD,%dH⏳", days, hours))
|
||||||
|
|
Loading…
Reference in a new issue