Fix the datetime issue when writing to the database for !cookie and the karma commands as well

This commit is contained in:
Daan Boerlage 2021-11-08 00:15:25 +01:00
parent c9af82015b
commit ee31e66e75
Signed by: daan
GPG key ID: FCE070E1E4956606
2 changed files with 2 additions and 2 deletions

View file

@ -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();

View file

@ -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();