]> git.cworth.org Git - sup/commitdiff
bugfix: correct time format in sent message mbox
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Mon, 15 Jun 2009 16:48:20 +0000 (12:48 -0400)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Mon, 15 Jun 2009 16:48:20 +0000 (12:48 -0400)
Use Time#asctime. Otherwise for strange locales, the mbox format is
not quite right and the splitter won't be able to read it!

lib/sup/sent.rb

index ee843c7dc54837acbcc39daab851509037692bb0..d4fcc2bc37dafdcd6e2b37beb3d6ec71cbbff716 100644 (file)
@@ -14,11 +14,11 @@ class SentManager
   def self.source_id; 9998; end
   def new_source; @source = Recoverable.new SentLoader.new; end
 
-  def write_sent_message date, from_email
+  def write_sent_message time, from_email
     need_blank = File.exists?(@fn) && !File.zero?(@fn)
     File.open(@fn, "a") do |f|
       f.puts if need_blank
-      f.puts "From #{from_email} #{date}"
+      f.puts "From #{from_email} #{time.asctime}"
       yield f
     end