fix bug in time calculation
This commit is contained in:
1 parent
138af6b4ac
commit
eff25a79f6
1 file changed
+1
-1
+1
-1
@@ -290,7 +290,7 @@ func CalcDaysUntil(mydate string) int {
|
||||
if err != nil {
|
||||
days = 0
|
||||
}
|
||||
days = int(t.Sub(time.Now()).Hours() / 24)
|
||||
days = int(t.Sub(time.Now().Truncate(24*time.Hour)).Hours() / 24)
|
||||
|
||||
return days
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user