Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2024-07-17 17:39:53 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2024-07-17 17:39:53 +0300
commit7417c52c8f8f78949012b3245aff9c3dc6e25ebf (patch)
tree8cf46b5bdfcc838064e67f06b11361bbbbded61b
parent4d4eef8d8afae8d1f2db6b8b4d28979e04df41fb (diff)
fixed - sub show time when "Start After First Use"v2.3.9
-rw-r--r--sub/subService.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/sub/subService.go b/sub/subService.go
index 899b231e..0ee18129 100644
--- a/sub/subService.go
+++ b/sub/subService.go
@@ -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))