diff options
author | Bradley Taunt <bt@btxx.org> | 2024-07-24 10:11:54 -0400 |
---|---|---|
committer | Bradley Taunt <bt@btxx.org> | 2024-07-24 10:11:54 -0400 |
commit | c4d9c9f19c0626f5ad85955b5b0da37e3a4afc8c (patch) | |
tree | ddfae202a04cb827ea2987a264a86d92c7e886ab | |
parent | 5e4710d5e57ff7b436df50510d199fb87e2c611b (diff) |
Remove need to require 'time', remove any mention of UTC conversion
-rw-r--r-- | wruby.rb | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1,7 +1,6 @@ require 'kramdown' require 'fileutils' require 'date' -require 'time' require 'rss' require 'find' require 'yaml' @@ -107,13 +106,13 @@ end def generate_rss(posts, rss_file, author_name, site_name, site_url, posts_dir) rss = RSS::Maker.make("2.0") do |maker| maker.channel.author = author_name - maker.channel.updated = Time.now.utc.to_s + maker.channel.updated = Time.now.to_s maker.channel.title = "#{site_name} RSS Feed" maker.channel.description = "The official RSS Feed for #{site_url}" maker.channel.link = site_url posts.each do |post| - date = DateTime.parse(post[:date].to_s).to_time + date = Date.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 +120,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.utc.to_s - item.pubDate = date.utc.rfc822 + item.updated = date.to_s + item.pubDate = date.rfc822 item.description = item_content end end |