Hi, I know that .Net is lack of TimeZone info with the DateTime type. And seems that cause the Npgsql have some problem with timestamp with timezone.
To avoid timezone issue in .Net, I convert all my DateTime value to UTC, and set all my DateTime variable's Kind property to UTC. It's works ok in my application. just like timestamp without timezone. However, when I use Npgsql insert the data to postgresql, I found all my DateTime value are read as system local timezone. It's definitly wrong, since all DateTime.Kind are set to UTC, which should be read as UTC timezone, rather than local time. The reason why I didn't alter the table structure for the field from timestamp with timezone to timestamp without timezone, is I do need the timezone in the column and my other applications, which directly use SQL to operate postgresql will use timezone info. My current version of Npgsql is 1.9x which is Npgsql 2. My request is that could Npgsql check DateTime.Kind value before convert it to SQL? If the Kind is Local then use system local timezone, otherwise(Unspecified or UTC) which use the UTC timezone. Regards, Tao Wang _______________________________________________ Npgsql-general mailing list Npgsql-general@gborg.postgresql.org http://gborg.postgresql.org/mailman/listinfo/npgsql-general