aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBradley Taunt <bt@btxx.org>2024-07-24 10:06:12 -0400
committerBradley Taunt <bt@btxx.org>2024-07-24 10:06:12 -0400
commit5e4710d5e57ff7b436df50510d199fb87e2c611b (patch)
tree36598c71f5603a61e83f0dc090f3d156cd005c03
parent31bcf536495fc51622a35cb278d5ca3248c56fdf (diff)
Try to avoid issues with local time based servers
-rw-r--r--wruby.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/wruby.rb b/wruby.rb
index c9924c6..e7cff30 100644
--- a/wruby.rb
+++ b/wruby.rb
@@ -113,7 +113,7 @@ def generate_rss(posts, rss_file, author_name, site_name, site_url, posts_dir)
maker.channel.link = site_url
posts.each do |post|
- date = DateTime.parse(post[:date].to_s).to_time.utc
+ date = DateTime.parse(post[:date].to_s).to_time
item_link = "#{site_url}/#{posts_dir}/#{post[:link]}"
item_title = post[:title]
item_content = post[:content]
@@ -121,8 +121,8 @@ def generate_rss(posts, rss_file, author_name, site_name, site_url, posts_dir)
maker.items.new_item do |item|
item.link = item_link
item.title = item_title
- item.updated = date.to_s
- item.pubDate = date.rfc822
+ item.updated = date.utc.to_s
+ item.pubDate = date.utc.rfc822
item.description = item_content
end
end