diff --git a/debian/patches/reproducibility b/debian/patches/reproducibility index 6def319..ddcee1f 100644 --- a/debian/patches/reproducibility +++ b/debian/patches/reproducibility @@ -10,7 +10,7 @@ Bug-Debian: https://bugs.debian.org/807201 comment "http://github.com/rtomayko/ronn/tree/#{Ronn.revision}" return if name.nil? - macro "TH", %["#{escape(name.upcase)}" "#{section}" "#{date.strftime('%B %Y')}" "#{version}" "#{manual}"] -+ macro "TH", %["#{escape(name.upcase)}" "#{section}" "#{date.strftime('%Y-%m-%d')}" "#{version}" "#{manual}"] ++ macro "TH", %["#{escape(name.upcase)}" "#{section}" "#{date.utc.strftime('%Y-%m-%d')}" "#{version}" "#{manual}"] end def remove_extraneous_elements!(doc) @@ -21,10 +21,19 @@ Bug-Debian: https://bugs.debian.org/807201 def date - @document.date.strftime('%B %Y') -+ @document.date.strftime('%Y-%m-%d') ++ @document.date.utc.strftime('%Y-%m-%d') end def wrap_class_name +--- a/lib/ronn/document.rb ++++ b/lib/ronn/document.rb +@@ -166,6 +166,7 @@ + def date + return @date if @date + return File.mtime(path) if File.exist?(path) ++ return Time.at(ENV['SOURCE_DATE_EPOCH'].to_i).gmtime if not ENV['SOURCE_DATE_EPOCH'].nil? + Time.now + end --- a/test/test_ronn.rb +++ b/test/test_ronn.rb @@ -23,7 +23,7 @@