Switch from DateTime to DateTimeOffset

This commit is contained in:
Alexey Golub
2019-04-11 01:20:52 +03:00
parent 4bfb2ec7fd
commit 6d9bc3625f
20 changed files with 122 additions and 79 deletions

View File

@@ -117,7 +117,7 @@ namespace DiscordChatExporter.Core.Services
var title = json["title"]?.Value<string>();
var description = json["description"]?.Value<string>();
var url = json["url"]?.Value<string>();
var timestamp = json["timestamp"]?.Value<DateTime>();
var timestamp = json["timestamp"]?.Value<DateTimeOffset>();
// Get color
var color = json["color"] != null
@@ -164,8 +164,8 @@ namespace DiscordChatExporter.Core.Services
// Get basic data
var id = json["id"].Value<string>();
var channelId = json["channel_id"].Value<string>();
var timestamp = json["timestamp"].Value<DateTime>();
var editedTimestamp = json["edited_timestamp"]?.Value<DateTime?>();
var timestamp = json["timestamp"].Value<DateTimeOffset>();
var editedTimestamp = json["edited_timestamp"]?.Value<DateTimeOffset?>();
var content = json["content"].Value<string>();
var type = (MessageType) json["type"].Value<int>();