diff --git a/src/main/java/com/jagrosh/giveawaybot/GiveawayManager.java b/src/main/java/com/jagrosh/giveawaybot/GiveawayManager.java index 0aad9b1c..1e9fd014 100644 --- a/src/main/java/com/jagrosh/giveawaybot/GiveawayManager.java +++ b/src/main/java/com/jagrosh/giveawaybot/GiveawayManager.java @@ -36,6 +36,7 @@ import com.jagrosh.interactions.requests.Route; import com.jagrosh.interactions.util.JsonUtil; import java.awt.Color; +import java.time.Clock; import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -137,6 +138,7 @@ public boolean endGiveaway(Giveaway giveaway) List all = new ArrayList<>(entries); List winners = GiveawayUtil.selectWinners(all, giveaway.getWinners()); CachedUser host = database.getUser(giveaway.getUserId()); + giveaway.setEndInstant(Instant.now(Clock.systemDefaultZone())); try { JSONObject summary = createGiveawaySummary(giveaway, host, entries, winners);