Author: reinhard Date: 2006-10-11 10:31:18 -0500 (Wed, 11 Oct 2006) New Revision: 8756
Modified: trunk/gnue-common/src/datasources/drivers/sql/postgresql/pygresqldrv.py Log: Workaround for bug in pygresql. Modified: trunk/gnue-common/src/datasources/drivers/sql/postgresql/pygresqldrv.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/sql/postgresql/pygresqldrv.py 2006-10-11 15:30:52 UTC (rev 8755) +++ trunk/gnue-common/src/datasources/drivers/sql/postgresql/pygresqldrv.py 2006-10-11 15:31:18 UTC (rev 8756) @@ -99,3 +99,18 @@ _drivername_ = 'pgdb' _need_rollback_after_exception_ = True + + + # --------------------------------------------------------------------------- + # Create an apropriate time object for the given values + # --------------------------------------------------------------------------- + + def _createTime_ (self, hour, minute, second, msec = 0): + """ + PygreSQL time handling is broken, we need to use the Timestamp constructor + instead of the Time constructor + """ + + psec = second + float (msec) / 1000000 + + return self._driver.Timestamp (1970, 1, 1, hour, minute, psec) _______________________________________________ commit-gnue mailing list [email protected] http://lists.gnu.org/mailman/listinfo/commit-gnue
