ssg: StaticSitePostFrontMatter: remove timezone conversions, OLW deals in UTC internally

This commit is contained in:
Nick Vella 2019-07-19 15:43:34 +10:00
parent f51cc368be
commit aed86f9b3b
1 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ namespace OpenLiveWriter.BlogClient.Clients.StaticSite
Title = post.Title;
Tags = post.Categories.Union(post.NewCategories).Select(cat => cat.Name).ToArray();
Date = (post.HasDatePublishedOverride ? post.DatePublishedOverride : post.DatePublished)
.ToUniversalTime().ToString("yyyy-MM-dd HH:mm:ss");
.ToString("yyyy-MM-dd HH:mm:ss");
Layout = post.IsPage ? "page" : "post";
}
@ -109,7 +109,7 @@ namespace OpenLiveWriter.BlogClient.Clients.StaticSite
post.Id = Id;
post.Title = Title;
post.Categories = Tags?.Select(t => new BlogPostCategory(t)).ToArray();
try { post.DatePublished = post.DatePublishedOverride = DateTime.Parse(Date).ToLocalTime(); } catch { }
try { post.DatePublished = post.DatePublishedOverride = DateTime.Parse(Date); } catch { }
post.IsPage = Layout == "page";
}