From 8b90d4bb8a70800b5db84d6dc65cb68a91cb45e5 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Mon, 22 Jul 2013 10:52:37 -0400 Subject: [PATCH] Actually use our tz-aware datetime object when changing awareness (imported from commit e0f85534fa12a712dd8c61b66abd687d36ba9088) --- zephyr/lib/actions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zephyr/lib/actions.py b/zephyr/lib/actions.py index d42b11995a..127faa8096 100644 --- a/zephyr/lib/actions.py +++ b/zephyr/lib/actions.py @@ -1332,8 +1332,8 @@ def handle_missedmessage_emails(user_profile_id, missed_email_events): last_reminder = last_reminder.replace(tzinfo=utc) waitperiod = datetime.timedelta(hours=UserProfile.EMAIL_REMINDER_WAITPERIOD) - if len(messages) == 0 or (user_profile.last_reminder and \ - timestamp - user_profile.last_reminder < waitperiod): + if len(messages) == 0 or (last_reminder and \ + timestamp - last_reminder < waitperiod): # Don't spam the user, if we've sent an email in the last day return