fix: FromDateTimeUtc needs, as mentioned, an UTC datetime

This commit is contained in:
spiral 2021-11-10 23:50:44 -05:00
parent 343fafe9f0
commit f7b48ab30d
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31

View File

@ -76,7 +76,7 @@ namespace PluralKit.Bot
{ {
// if (_lastErrorInChannel.TryGetValue(channelId, out var lastErrorTime)) // if (_lastErrorInChannel.TryGetValue(channelId, out var lastErrorTime))
var startupTime = Instant.FromDateTimeUtc(Process.GetCurrentProcess().StartTime); var startupTime = Instant.FromDateTimeUtc(Process.GetCurrentProcess().StartTime.ToUniversalTime());
// don't send errors during startup // don't send errors during startup
// mostly because Npgsql throws a bunch of errors when opening connections sometimes??? // mostly because Npgsql throws a bunch of errors when opening connections sometimes???
if ((now - startupTime) < IntervalFromStartup) if ((now - startupTime) < IntervalFromStartup)