diff options
author | vnugent <public@vaughnnugent.com> | 2023-08-04 11:56:08 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-08-04 11:56:08 -0400 |
commit | c3c0ece6fb3a66c2de545858731a066d5542ff1e (patch) | |
tree | 1c449e3dae49b4861a21820951934b1a188f6fe1 /back-end/src/FeedGenerator.cs | |
parent | 97a5522a65d75fcddd71b70b551658b74cbd3907 (diff) |
feed sort by created data not last modified
Diffstat (limited to 'back-end/src/FeedGenerator.cs')
-rw-r--r-- | back-end/src/FeedGenerator.cs | 4 |
1 files changed, 2 insertions, 2 deletions
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); |