aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_plugins/devaway.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/_plugins/devaway.rb b/_plugins/devaway.rb
index 0cd8990..38d96e6 100644
--- a/_plugins/devaway.rb
+++ b/_plugins/devaway.rb
@@ -10,13 +10,13 @@ module Gentoo
data = Nokogiri::XML(File.open(DEVAWAY_XML))
site.data['devaway'] ||= {}
- now = Time.now
+ now = DateTime.now
data.xpath('/devaway/dev').each do |dev|
reason = dev.xpath('./reason/text()').first.content
date_match = DATE_REGEXP.match(reason)
reason = date_match.pre_match.rstrip()
- date = Time.utc(*(date_match.captures.map(&:to_i)))
+ date = DateTime.parse(dev['timestamp'])
away_sec = now - date
site.data['devaway'][dev['nick']] = {