From ee31e66e7548047a2ee79ef5dbe556b2e5eb6913 Mon Sep 17 00:00:00 2001 From: Daan Boerlage Date: Mon, 8 Nov 2021 00:15:25 +0100 Subject: [PATCH] Fix the datetime issue when writing to the database for !cookie and the karma commands as well --- src/Bot/Commands/Rpg/Cookies.cs | 2 +- src/Commands/Karma/Karma.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bot/Commands/Rpg/Cookies.cs b/src/Bot/Commands/Rpg/Cookies.cs index 0bdbd10..15e6d19 100644 --- a/src/Bot/Commands/Rpg/Cookies.cs +++ b/src/Bot/Commands/Rpg/Cookies.cs @@ -148,7 +148,7 @@ namespace Geekbot.Bot.Commands.Rpg GuildId = Context.Guild.Id.AsLong(), UserId = userId.AsLong(), Cookies = 0, - LastPayout = DateTimeOffset.MinValue + LastPayout = DateTimeOffset.MinValue.ToUniversalTime() }; var newUser = _database.Cookies.Add(user).Entity; await _database.SaveChangesAsync(); diff --git a/src/Commands/Karma/Karma.cs b/src/Commands/Karma/Karma.cs index 6abed5e..a02b388 100644 --- a/src/Commands/Karma/Karma.cs +++ b/src/Commands/Karma/Karma.cs @@ -104,7 +104,7 @@ public class Karma GuildId = _guildId, UserId = userId, Karma = 0, - TimeOut = DateTimeOffset.MinValue + TimeOut = DateTimeOffset.MinValue.ToUniversalTime() }; var newUser = _database.Karma.Add(user).Entity; await _database.SaveChangesAsync();