Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Sascha Silbe <sascha-pgp@silbe.org>
To: sup-devel <sup-devel@rubyforge.org>
Subject: [sup-devel] [PATCH] mbox: fix date format
Date: Thu,  8 Jul 2010 12:28:07 +0000	[thread overview]
Message-ID: <1278592087-614-1-git-send-email-sascha-pgp@silbe.org> (raw)

The date format used in all (known/common) variations is that of Unix/POSIX
asctime(), not the RFC 822 / RFC 2822 Date: header format.

Using an incorrect date format causes at least mutt, mb2md and Python
UnixMailbox (but not PortableUnixMailbox) to either reject the mailbox or show
it as empty.

References:
http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/mail-mbox-formats.html
http://www.qmail.org/man/man5/mbox.html

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
---
 lib/sup/mbox.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb
index 2bf32ea..452519d 100644
--- a/lib/sup/mbox.rb
+++ b/lib/sup/mbox.rb
@@ -140,7 +140,7 @@ class MBox < Source
     need_blank = File.exists?(@filename) && !File.zero?(@filename)
     File.open(@filename, "ab") do |f|
       f.puts if need_blank
-      f.puts "From #{from_email} #{date.rfc2822}"
+      f.puts "From #{from_email} #{date.asctime}"
       yield f
     end
   end
-- 
1.7.1

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


             reply	other threads:[~2010-07-08 12:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-08 12:28 Sascha Silbe [this message]
2010-07-13  2:10 ` Rich Lane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1278592087-614-1-git-send-email-sascha-pgp@silbe.org \
    --to=sascha-pgp@silbe.org \
    --cc=sascha-ml-reply-to-2010-2@silbe.org \
    --cc=sup-devel@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox