Index: sitescripts/formmail/web/formmail.py |
=================================================================== |
--- a/sitescripts/formmail/web/formmail.py |
+++ b/sitescripts/formmail/web/formmail.py |
@@ -16,7 +16,7 @@ |
# along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
import re |
-import time |
+import datetime |
from urlparse import parse_qsl |
from sitescripts.utils import get_config, sendMail, setupStderr |
from sitescripts.web import url_handler |
@@ -51,6 +51,6 @@ |
if not re.match(r'^\w[\w.+!-]+@\w[\w.-]+\.[a-zA-Z]{2,6}$', params['email']): |
return 'Invalid email address' |
- params['strftime'] = time.strftime |
+ params['time'] = datetime.datetime.now() |
sendMail(get_config().get('formmail', 'template'), params) |
return 'Message sent' |