From 257ab677963bf235b617e984ade0b97df8c5af63 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sat, 8 May 2010 15:53:47 +0200 Subject: quotes: Fixed timestamp when adding quotes. --- modules/quotes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/quotes.py b/modules/quotes.py index 13c8a6d..a5060cd 100644 --- a/modules/quotes.py +++ b/modules/quotes.py @@ -27,7 +27,7 @@ class Quotes: def add(self, nick, quote): cur = self.db.cursor() - cur.execute('insert into quotes (nick, date, quote) values (%s, datetime("now"), %s)', (nick, quote)) + cur.execute('insert into quotes (nick, date, quote) values (%s, extract(epoch FROM now()), %s)', (nick, quote)) cur.execute('select currval(\'quotes_id_seq\')') lastrowid = cur.fetchone()[0] cur.close() -- cgit v1.2.3