mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-14 04:56:33 +03:00
9de46e416e
Forward compatible with newer Pythons.
10 lines
207 B
Python
10 lines
207 B
Python
import datetime
|
|
import time
|
|
import psycopg2
|
|
|
|
conn = psycopg2.connect("dbname=test")
|
|
curs = conn.cursor()
|
|
curs.execute("set timezone = 'Asia/Calcutta'")
|
|
curs.execute("SELECT now()")
|
|
print(curs.fetchone()[0])
|