Navigation Menu

Skip to content

Commit

Permalink
Changed datetime.today to datetime.now
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrgn committed Sep 25, 2011
1 parent d0c424c commit e6a1fcb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions debug_toolbar/management/commands/debugsqlshell.py
Expand Up @@ -9,12 +9,12 @@

class PrintQueryWrapper(util.CursorDebugWrapper):
def execute(self, sql, params=()):
starttime = datetime.today()
starttime = datetime.now()
try:
return self.cursor.execute(sql, params)
finally:
raw_sql = self.db.ops.last_executed_query(self.cursor, sql, params)
execution_time = datetime.today() - starttime
execution_time = datetime.now() - starttime
print sqlparse.format(raw_sql, reindent=True)
print
print 'Execution time: %fs' % execution_time.total_seconds()
Expand Down

0 comments on commit e6a1fcb

Please sign in to comment.