[PyQt] QSqlTableModel.submitAll() problems with milliseconds and PostgreSQL time field

Chris Mayo mayo at clara.co.uk
Tue Aug 25 08:48:15 BST 2009


Chris Mayo wrote:
> If I create a PostgreSQL database 'test' and execute the following:
> CREATE TABLE timetest ( t time );
> INSERT INTO timetest VALUES ('0:0:0');
> 

> 
> The output is:
> 00:00:00.000
> 00:12:34.500
> 00:12:34.000
> 
> The database doesn't get the 500 milliseconds.
> 
> 
> Even worse if I execute on the database:
> UPDATE timetest SET t = '0:11:22.33';
> 
> and then run the Python above I get:
> 00:11:22.330
> 00:12:34.500
> 00:11:22.330
> 
> the value from the model doesn't make it into the database at all if the
> time field already has milliseconds.
> 
> 

I have hacked some C++ together and still get the same result. So it
looks like a Qt problem and will try Nokia.



More information about the PyQt mailing list