fix RSS shjit again

This commit is contained in:
yuzu 2025-05-09 16:48:17 -05:00
parent a775b63efc
commit 68216600f0

View File

@ -33,7 +33,21 @@ fn generateRss(items: []const RssItem, allocator: std.mem.Allocator) ![]u8 {
\\<description>{s}</description>
, .{ item.title, item.id, item.id, item.blob });
try item.created_at.format("Day, DD, Mon YYYY HH:MM:SS GMT", .{}, writer);
try writer.print(
\\<pubDate>
\\{s}, {d} {s} {d} {d}:{d}:{d} {s}
\\</pubDate>
, .{ // note: Day, DD, MM, YYYY, HH:MM:SS GMT
item.created_at.dayOfWeek(),
item.created_at.day(),
item.created_at.monthNameAbbreviated(),
item.created_at.year(),
item.created_at.hour(),
item.created_at.minute(),
item.created_at.second(),
"-0500",
}
);
try writer.print(
\\</item>