Fix parsing timestamps with a timezone attached

Resolves #918.

For some reason (that i'm sure will bite me in the ass later), we
configured Json.Net with a time format that forced UTC - even when the
API appends a timezone to the timestamp. Removing the custom time format
seems to resolve this issue.
This commit is contained in:
Christopher F
2018-01-06 23:36:08 -05:00
parent fdd2c80d2b
commit 9d77a3cd37

View File

@@ -1,4 +1,4 @@
#pragma warning disable CS1591
#pragma warning disable CS1591
#pragma warning disable CS0618
using Discord.API.Rest;
using Discord.Net;
@@ -52,7 +52,7 @@ namespace Discord.API
_restClientProvider = restClientProvider;
UserAgent = userAgent;
DefaultRetryMode = defaultRetryMode;
_serializer = serializer ?? new JsonSerializer { DateFormatString = "yyyy-MM-ddTHH:mm:ssZ", ContractResolver = new DiscordContractResolver() };
_serializer = serializer ?? new JsonSerializer { ContractResolver = new DiscordContractResolver() };
RequestQueue = new RequestQueue();
_stateLock = new SemaphoreSlim(1, 1);