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:29:51 UTC

incubator-ponymail git commit: Bug: atom.lua - should generate date in UTC, not local time

Repository: incubator-ponymail
Updated Branches:
  refs/heads/master 07d153d25 -> 5ee25e85b


Bug: atom.lua - should generate date in UTC, not local time

This fixes #408

Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/5ee25e85
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/5ee25e85
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/5ee25e85

Branch: refs/heads/master
Commit: 5ee25e85b466971b4df363e47c55d23929209e0f
Parents: 07d153d
Author: Sebb <se...@apache.org>
Authored: Tue Sep 12 12:29:48 2017 +0100
Committer: Sebb <se...@apache.org>
Committed: Tue Sep 12 12:29:48 2017 +0100

----------------------------------------------------------------------
 CHANGELOG.md      | 1 +
 site/api/atom.lua | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/5ee25e85/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e9d7fc9..d8091c3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## CHANGES in 0.10:
+- Bug: atom.lua - should generate date in UTC, not local time (#408)
 - Bug: shorten links does not work with cluster ids (#406)
 - Drop lid from 'cluster' hash - it's already in the id (#400)
 - Enh: 'cluster' generator ids are not sufficiently unique (#398)

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/5ee25e85/site/api/atom.lua
----------------------------------------------------------------------
diff --git a/site/api/atom.lua b/site/api/atom.lua
index 07f15cd..546db0c 100644
--- a/site/api/atom.lua
+++ b/site/api/atom.lua
@@ -166,7 +166,8 @@ function handle(r)
 <id>%s/list.html?%s</id>
     ]]):format(listid, hostname, listid, hostname, listid, hostname, listid) )
     for k, eml in pairs(emls) do
-        local date = os.date("%Y-%m-%dT%H:%M:%S", eml.epoch) .. "Z"
+        -- use UTC (leading !)
+        local date = os.date("!%Y-%m-%dT%H:%M:%S", eml.epoch) .. "Z"
         r:puts(([[
 <entry>
 <title>%s</title>