Abhilash Raj pushed to branch master at GNU Mailman / Mailman Core
Commits: ff8e632c by Mark Sapiro at 2019-05-07T16:09:32Z Correct timezone in X-Mailman-Approved-At header. - - - - - 8e1cf75f by Abhilash Raj at 2019-05-07T16:09:32Z Merge branch 'approved' into 'master' Correct timezone in X-Mailman-Approved-At header. Closes #584 See merge request mailman/mailman!506 - - - - - 3 changed files: - setup.py - src/mailman/app/moderator.py - src/mailman/docs/NEWS.rst Changes: ===================================== setup.py ===================================== @@ -116,6 +116,7 @@ case second 'm'. Any other spelling is incorrect.""", 'importlib_resources', 'gunicorn', 'lazr.config', + 'python-dateutil>=2.0', 'passlib', 'requests', 'sqlalchemy>=1.2.3', ===================================== src/mailman/app/moderator.py ===================================== @@ -20,6 +20,7 @@ import time import logging +from dateutil.tz import tzlocal from email.utils import formatdate, getaddresses, make_msgid from mailman.app.membership import delete_member from mailman.config import config @@ -134,7 +135,7 @@ def handle_message(mlist, id, action, comment=None, forward=None): # here can lead to a huge delay in web turnaround. Log the moderation # and add a header. msg['X-Mailman-Approved-At'] = formatdate( - time.mktime(now().timetuple()), localtime=True) + time.mktime(now(tz=tzlocal()).timetuple()), localtime=True) vlog.info('held message approved, message-id: %s', msg.get('message-id', 'n/a')) # Stick the message back in the incoming queue for further ===================================== src/mailman/docs/NEWS.rst ===================================== @@ -21,6 +21,7 @@ Bugs * A list member with ``receive_list_copy`` set to ``False`` who is addressed in ``CC`` will now be removed from ``CC`` even if this results in no ``CC``. (Closes #575) +* ``X-Mailman-Approved-At`` header now has correct timezone. (Closes #584) Command line ------------ View it on GitLab: https://gitlab.com/mailman/mailman/compare/3b18f7046edf0ef5b58f74301c0c1ef8600a0e99...8e1cf75fcffca0d2e9a3abd21446416c57180df8 -- View it on GitLab: https://gitlab.com/mailman/mailman/compare/3b18f7046edf0ef5b58f74301c0c1ef8600a0e99...8e1cf75fcffca0d2e9a3abd21446416c57180df8 You're receiving this email because of your account on gitlab.com.
_______________________________________________ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org