Curious Win32 timestamp shift
Kingsley <[email protected]> Thu, 21 Jun 2007 14:46:32 +1000
| Newsgroups | gmane.comp.python.db.pypgsql.user |
|---|---|
| Message-ID | <[email protected]> |
Hi-ho, I'm using PyPgSQL against a table that has a 'timestamp' type field. Under Linux I have no problems, but when results are returned from the database under win32, they are shifted by +10 hours (This is also happens to be my timezone.) I have not applied a timezone to the timestamp-type field. Interestingly, they are being stored correctly, just not retrieved properly. The times in the database are indeed stored in UTC, but PyPgSQL doesn't know this ;) Any suggestions as to why this should happen only under Windows? How about hints on how to fix it? I could always kludge in an: timestamp - interval '-36000 seconds' Type fix, but that's very dodgey. (even if the timeshift is from time.timezone) The timezone is set under windows, as it is under Linux. (GMT+10 / Sydney, NSW) I'm using "pyPgSQL-pre2.5-20050926.win32-py2.4.exe" as the latest version crashes my (py2exe) exe, during "import pyPgSQL". thanks, -kt ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/