From 7e138622129c96a634b41f99dc552015cbe4b5a6 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 7 Jan 2017 01:12:54 -0500 Subject: Consistently use Time (rather than Date or DateTime). --- lib/page_local.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/page_local.rb') diff --git a/lib/page_local.rb b/lib/page_local.rb index ad4e970..7846a3b 100644 --- a/lib/page_local.rb +++ b/lib/page_local.rb @@ -69,13 +69,13 @@ class LocalPage < Page end def _gitdates - @gitdates ||= `git log --format='%cI' -- #{local_infile}`.split("\n").select{|s|!s.empty?}.map{|s|DateTime::iso8601(s)} + @gitdates ||= `git log --format='%cI' -- #{local_infile}`.split("\n").select{|s|!s.empty?}.map{|s|DateTime::iso8601(s).to_time} end def page_published if @_published.nil? raw = _pandoc['published'] - @_published = Datetime::parse(raw) unless raw.nil? + @_published = DateTime::parse(raw).to_time unless raw.nil? end if @_published.nil? @_published = _gitdates.sort.first @@ -86,7 +86,7 @@ class LocalPage < Page def page_updated if @_updated.nil? raw = _pandoc['updated'] - @_updated = DateTime::parse(raw) unless raw.nil? + @_updated = DateTime::parse(raw).to_time unless raw.nil? end if @_updated.nil? @updated = _gitdates.sort.last -- cgit v1.2.3