diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-05-08 15:53:47 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-05-08 15:53:47 +0200 |
commit | 257ab677963bf235b617e984ade0b97df8c5af63 (patch) | |
tree | ff0ad0ae5929e0f8bab48a38a137f9ff677c3b8f | |
parent | d2ce9f3eaf4bbd0ce97f8158ee676a56c8e00a1a (diff) |
quotes: Fixed timestamp when adding quotes.
-rw-r--r-- | modules/quotes.py | 2 |
1 files changed, 1 insertions, 1 deletions
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() |