From c3c0ece6fb3a66c2de545858731a066d5542ff1e Mon Sep 17 00:00:00 2001 From: vnugent Date: Fri, 4 Aug 2023 11:56:08 -0400 Subject: feed sort by created data not last modified --- back-end/src/FeedGenerator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'back-end') diff --git a/back-end/src/FeedGenerator.cs b/back-end/src/FeedGenerator.cs index de4a1e2..2aed945 100644 --- a/back-end/src/FeedGenerator.cs +++ b/back-end/src/FeedGenerator.cs @@ -112,7 +112,7 @@ namespace Content.Publishing.Blog.Admin int maxItems = context.Feed.MaxItems ?? defaultMaxItems; //Take only the latest max items - posts = posts.OrderByDescending(static p => p.Date).Take(maxItems); + posts = posts.OrderByDescending(static p => p.Created).Take(maxItems); //Write the posts as items but sort in order of their pub date foreach (PostMeta post in posts) @@ -131,7 +131,7 @@ namespace Content.Publishing.Blog.Admin writer.WriteElementString("itunes", "summary", null, post.Summary); //Time as iso string from unix seconds timestamp - string pubDate = DateTimeOffset.FromUnixTimeSeconds(post.Date).ToString("R"); + string pubDate = DateTimeOffset.FromUnixTimeSeconds(post.Created).ToString("R"); writer.WriteElementString("pubDate", pubDate); writer.WriteElementString("published", pubDate); -- cgit