summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-05-08 15:53:47 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2010-05-08 15:53:47 +0200
commit257ab677963bf235b617e984ade0b97df8c5af63 (patch)
treeff0ad0ae5929e0f8bab48a38a137f9ff677c3b8f
parentd2ce9f3eaf4bbd0ce97f8158ee676a56c8e00a1a (diff)
quotes: Fixed timestamp when adding quotes.
-rw-r--r--modules/quotes.py2
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()