diff options
author | Chris Mildebrandt <chris@woodenrhino.com> | 2014-05-20 09:42:41 -0700 |
---|---|---|
committer | Chris Mildebrandt <chris@woodenrhino.com> | 2014-05-20 09:42:41 -0700 |
commit | 67354ed14f2ac76cbb29e3b32efa9bf6c00d03a2 (patch) | |
tree | e6e42a0e63deac6afd549bf9bbc3c9c7a7a69f81 | |
parent | 8746b0c6b7a243f97fa2d769c6cbf4b48a523ab3 (diff) | |
download | psycopg2-67354ed14f2ac76cbb29e3b32efa9bf6c00d03a2.tar.gz |
cleanup remaining GPL license text
-rw-r--r-- | sandbox/test-psycopg2-datetime-systematic.py | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/sandbox/test-psycopg2-datetime-systematic.py b/sandbox/test-psycopg2-datetime-systematic.py deleted file mode 100644 index b7490d2..0000000 --- a/sandbox/test-psycopg2-datetime-systematic.py +++ /dev/null @@ -1,70 +0,0 @@ -# ======================================================================= -# $Source: /sources/gnumed/gnumed/gnumed/client/testing/test-psycopg2-datetime-systematic.py,v $ -__version__ = "$Revision: 1.1 $" -__author__ = "K.Hilbert <Karsten.Hilbert@gmx.net>" -__license__ = 'GPL (details at http://www.gnu.org)' -# ======================================================================= - -print "testing psycopg2 date/time parsing" - -import psycopg2 -print "psycopg2:", psycopg2.__version__ - -#dsn = u'dbname=gnumed_v10 user=any-doc password=any-doc' -dsn = u'dbname=test' -print dsn - -conn = psycopg2.connect(dsn=dsn) - -curs = conn.cursor() -cmd = u""" -select - name, - abbrev, - utc_offset::text, - case when - is_dst then 'DST' - else 'non-DST' - end -from pg_timezone_names""" -curs.execute(cmd) -rows = curs.fetchall() -curs.close() -conn.rollback() - -for row in rows: - - curs = conn.cursor() - - tz = row[0] - cmd = u"set timezone to '%s'" % tz - try: - curs.execute(cmd) - except StandardError, e: - print "cannot use time zone", row - raise e - curs.close() - conn.rollback() - continue - - cmd = u"""select '1920-01-19 23:00:00+01'::timestamp with time zone""" - try: - curs.execute(cmd) - curs.fetchone() - except StandardError, e: - print "%s (%s / %s / %s) failed:" % (tz, row[1], row[2], row[3]) - print " ", e - - curs.close() - conn.rollback() - -conn.close() - -# ======================================================================= -# $Log: test-psycopg2-datetime-systematic.py,v $ -# Revision 1.1 2009/02/10 18:45:32 ncq -# - psycopg2 cannot parse a bunch of settable time zones -# -# Revision 1.1 2009/02/10 13:57:03 ncq -# - test for psycopg2 on Ubuntu-Intrepid -# |