The 2.5.1 module incorrectly applies the timezone
offset to TIMESTAMP columns. I get correct results
querying TIMESTAMP columns using pqsl but pyPgSQL seems
to be double applying the timezone offset.
The attached patch Works For Me (TM) by only doing the
localtime() conversion for TIMESTAMP WITH TIME ZONE
columns.
Fix localtime conversion for TIMESTAMP columns
Logged In: YES
user_id=28658
And here is the small test program I used to see the before
and after behaviour.
$ python test-timestamp DATABASE-NAME
test program