aboutsummaryrefslogtreecommitdiff
path: root/wruby.rb
diff options
context:
space:
mode:
authorBradley Taunt <bt@btxx.org>2024-07-24 10:28:16 -0400
committerBradley Taunt <bt@btxx.org>2024-07-24 10:28:16 -0400
commit5d9e56c0035f595d7dcd94f75d81cd0e40c50e81 (patch)
tree2756700337fdc9e37540c5ba22a6a417c3d50bba /wruby.rb
parent2cc355cdcf27965aee7998db61c6420855bd8cb0 (diff)
Update core wruby
Diffstat (limited to 'wruby.rb')
-rw-r--r--wruby.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/wruby.rb b/wruby.rb
index c9924c6..d4f49e6 100644
--- a/wruby.rb
+++ b/wruby.rb
@@ -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.utc
+ date = Date.parse(post[:date].to_s).to_time + 12*60*60 # Force time to midday
item_link = "#{site_url}/#{posts_dir}/#{post[:link]}"
item_title = post[:title]
item_content = post[:content]