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

@@ -22,7 +22,8 @@ namespace DiscordChatExporter.Core.Rendering
_dateFormat = dateFormat;
}
private string FormatDate(DateTime date) => date.ToString(_dateFormat, CultureInfo.InvariantCulture);
private string FormatDate(DateTimeOffset date) =>
date.ToLocalTime().ToString(_dateFormat, CultureInfo.InvariantCulture);
private string FormatMarkdown(Node node)
{