~psycopg/psycopg/2.0.x

« back to all changes in this revision

Viewing changes to sandbox/tzhalf.py

  • Committer: Federico Di Gregorio
  • Date: 2006-01-10 16:13:37 UTC
  • Revision ID: fog-c5387888df073e9b1243e93fa0dcc0e9e91fc5a8
Some more tests in sandbox.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import datetime
 
2
import time
 
3
import psycopg2
 
4
 
 
5
conn = psycopg2.connect("dbname=test")
 
6
curs = conn.cursor()
 
7
curs.execute("set timezone = 'Asia/Calcutta'")
 
8
curs.execute("SELECT now()")
 
9
print curs.fetchone()[0]