You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2017/09/12 11:17:44 UTC
incubator-ponymail git commit: Output the timestamp in UTC and fix
field widths
Repository: incubator-ponymail
Updated Branches:
refs/heads/master 4fc4cbc40 -> 07d153d25
Output the timestamp in UTC and fix field widths
This completes the fix for #190
Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/07d153d2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/07d153d2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/07d153d2
Branch: refs/heads/master
Commit: 07d153d2527dd9b6ced7e61102d9cf56bf788e94
Parents: 4fc4cbc
Author: Sebb <se...@apache.org>
Authored: Tue Sep 12 12:17:40 2017 +0100
Committer: Sebb <se...@apache.org>
Committed: Tue Sep 12 12:17:40 2017 +0100
----------------------------------------------------------------------
site/api/mbox.lua | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/07d153d2/site/api/mbox.lua
----------------------------------------------------------------------
diff --git a/site/api/mbox.lua b/site/api/mbox.lua
index 20ba38f..9f3aa31 100644
--- a/site/api/mbox.lua
+++ b/site/api/mbox.lua
@@ -26,6 +26,13 @@ local utils = require 'lib/utils'
--[[
Parse the source to construct a valid 'From ' line.
+ e.g.
+ From dev-return-648-archive-asf-public=cust-asf.ponee.io@ponymail.incubator.apache.org Fri Dec 09 2016 12:48:01 2016
+
+ Note that the timestamp must be in the same format as unix ctime and must be in UTC
+ All the fields have constant width, i.e. the day of the month is zero-padded
+ (There are some existing archives that use space padding instead).
+
Look for:
Return-Path: <de...@ponymail.incubator.apache.org>
...
@@ -41,7 +48,7 @@ local function getFromLine(r, source)
local received = source:match("Received: +from .-; +(.-)[\r\n]")
if not received then received = "" end
local recd = r.date_parse_rfc(received) or 0
- local timeStamp = os.date('%c', recd) -- ctime format
+ local timeStamp = os.date('!%a %b %d %H:%M:%S %Y', recd) -- ctime format in UTC
return "From " .. replyTo .. " " .. timeStamp
end