diff options
author | Anike Arni <aarni@thoughtworks.com> | 2017-04-20 16:24:47 -0300 |
---|---|---|
committer | Anike Arni <aarni@thoughtworks.com> | 2017-04-20 16:24:47 -0300 |
commit | 93621607efc7b907fd30b06b000afb9430ccecfe (patch) | |
tree | aba9d514de07f3523e907d99fcc65119f6e8f7f3 /service/pixelated | |
parent | 014dde1cf661d2cc43dda79dcfa94ddc6a6b5ed0 (diff) |
[#927] Uses internal email date method for consistency
with @deniscostadsc
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/account_recovery.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/service/pixelated/account_recovery.py b/service/pixelated/account_recovery.py index f84aea1a..58242a7d 100644 --- a/service/pixelated/account_recovery.py +++ b/service/pixelated/account_recovery.py @@ -16,13 +16,13 @@ import pkg_resources import binascii +from email import message_from_string from twisted.internet.defer import inlineCallbacks, returnValue from twisted.logger import Logger from twisted.mail import smtp -from email import message_from_string -from email.utils import formatdate +from pixelated.support import date log = Logger() @@ -71,6 +71,7 @@ class AccountRecovery(object): raise e def _get_recovery_mail(self, code, sender, backup_email): + email_date = date.mail_date_now() recovery_mail = pkg_resources.resource_filename( 'pixelated.assets', 'recovery.mail.%s' % (self._language)) @@ -81,4 +82,4 @@ class AccountRecovery(object): recovery_code=binascii.hexlify(code), backup_email=backup_email, sender=sender, - date=formatdate(localtime=True))) + date=email_date)) |