Fix the datetime issue when writing to the database for !cookie and the karma commands as well
This commit is contained in:
parent
c9af82015b
commit
ee31e66e75
2 changed files with 2 additions and 2 deletions
|
@ -148,7 +148,7 @@ namespace Geekbot.Bot.Commands.Rpg
|
||||||
GuildId = Context.Guild.Id.AsLong(),
|
GuildId = Context.Guild.Id.AsLong(),
|
||||||
UserId = userId.AsLong(),
|
UserId = userId.AsLong(),
|
||||||
Cookies = 0,
|
Cookies = 0,
|
||||||
LastPayout = DateTimeOffset.MinValue
|
LastPayout = DateTimeOffset.MinValue.ToUniversalTime()
|
||||||
};
|
};
|
||||||
var newUser = _database.Cookies.Add(user).Entity;
|
var newUser = _database.Cookies.Add(user).Entity;
|
||||||
await _database.SaveChangesAsync();
|
await _database.SaveChangesAsync();
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class Karma
|
||||||
GuildId = _guildId,
|
GuildId = _guildId,
|
||||||
UserId = userId,
|
UserId = userId,
|
||||||
Karma = 0,
|
Karma = 0,
|
||||||
TimeOut = DateTimeOffset.MinValue
|
TimeOut = DateTimeOffset.MinValue.ToUniversalTime()
|
||||||
};
|
};
|
||||||
var newUser = _database.Karma.Add(user).Entity;
|
var newUser = _database.Karma.Add(user).Entity;
|
||||||
await _database.SaveChangesAsync();
|
await _database.SaveChangesAsync();
|
||||||
|
|
Loading…
Reference in a new issue