Commit 70aa86606b6a15893941af084fe62945a490a8e9

Authored by liuzujun
1 parent 024370be

发送多天邮件bug

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
src/models/Store.lua
... ... @@ -73,7 +73,7 @@ function Store:sendMonthCardEmail()
73 73 if ts == 0 then
74 74 cnt = 1
75 75 else
76   - local diff = dayLater(timeNow) - dayLater(ts)
  76 + local diff = math.floor((dayLater(timeNow) - dayLater(ts))/DAY_SEC)
77 77 diff = diff < 0 and 0 or diff
78 78 diff = diff > 31 and 31 or diff
79 79 cnt = diff
... ...