Daylight savings bug with timestamptz field
Daylight savings bug with timestamptz field
G'day all...
Since Australia went onto daylight savings time, We have a problem where the values of timestamptz fields are displaying in non-daylight-savings time instead of the correct daylight-savings time (i.e. one hour earlier). The correct time is displayed in pgExpress.
The problem is easily replicated by using the SQL statement "select now();", and it will display the incorrect (non-daylight-savings) time as the value of the returned field. The date/time and timezone settings are correct and up-to-date on both the server and the client.
So far, we have the problem with Postgres version 7, and the problem occurs in the Devart dbExpress drivers for PostgreSQL versions 1.3 and 2.0.
This is now an urgent problem for us as it is affecting live systems. Is there a fix or work-around available immediately? Any help would be much appreciated.
Thanks,
Alex.
Since Australia went onto daylight savings time, We have a problem where the values of timestamptz fields are displaying in non-daylight-savings time instead of the correct daylight-savings time (i.e. one hour earlier). The correct time is displayed in pgExpress.
The problem is easily replicated by using the SQL statement "select now();", and it will display the incorrect (non-daylight-savings) time as the value of the returned field. The date/time and timezone settings are correct and up-to-date on both the server and the client.
So far, we have the problem with Postgres version 7, and the problem occurs in the Devart dbExpress drivers for PostgreSQL versions 1.3 and 2.0.
This is now an urgent problem for us as it is affecting live systems. Is there a fix or work-around available immediately? Any help would be much appreciated.
Thanks,
Alex.
The postgresql.conf leaves the timezone parameter unspecified, so postgres defaults to the system timezone, which is set to Australia/Sydney. The system clock is set to UTC.
Note that the time displayed is correct when using the ZeosLib data access components and also when using the pgExpress dbExpress driver. The time displays correctly everywhere except applications using the Devart dbExpress driver.
Note that the time displayed is correct when using the ZeosLib data access components and also when using the pgExpress dbExpress driver. The time displays correctly everywhere except applications using the Devart dbExpress driver.
This query will return the current server time as a timestamptz field. It displays the correct daylight savings time in pgAdmin or any Delphi application not using Devart, but displays a time an hour earlier when using Devart.AlexP wrote:and also specify the result of execution of the following query:
select now()
I suggested "now()" as a test case because it is independent of any schema. We often retrieve the value of fields populated using the "now()" function and, despite containing the correct value, these fields display the incorrect time when read via Devart.
Dear Alex,
I have received no response to my e-mails to you on this subject, so I am posting this in the forum thread. We have had previous support issues addressed using the number quoted, so I am not sure why to you believe it to be for MySQL rather than PostgreSQL.
Please refer to original message below:
> From: Devart Sales
> Date: 26 November 2010 20:28:12 AEDT
> To: cdecrespigny(at)gmail.com
> Subject: dbExpress driver for PostgreSQL
>
>
> Thank you for the registration of dbExpress driver for PostgreSQL Standard
> with source code single license.
>
> Your developer license number is CRDBM-00383..
> Please use it when contact us.
>
> You can download the full version of dbExpress driver for Windows
> and source code as protected archive (Password: **********) at
> http://secure.devart.com/
>
> User: dbxpgsql130src
> Psw: **********
>
> Note: you have one year DbxPgSQL subscription starting from this date.
>
> Please write to [email protected] if you have any
> questions or problems with our product.
> Also you can post your comments to DbxPgSQL discussion
> forum that is available from http://devart.com/forums
>
> Devart Sales Team
> [email protected]
I trust this matter can be resolved quickly.
Regards,
Alex.
I have received no response to my e-mails to you on this subject, so I am posting this in the forum thread. We have had previous support issues addressed using the number quoted, so I am not sure why to you believe it to be for MySQL rather than PostgreSQL.
Please refer to original message below:
> From: Devart Sales
> Date: 26 November 2010 20:28:12 AEDT
> To: cdecrespigny(at)gmail.com
> Subject: dbExpress driver for PostgreSQL
>
>
> Thank you for the registration of dbExpress driver for PostgreSQL Standard
> with source code single license.
>
> Your developer license number is CRDBM-00383..
> Please use it when contact us.
>
> You can download the full version of dbExpress driver for Windows
> and source code as protected archive (Password: **********) at
> http://secure.devart.com/
>
> User: dbxpgsql130src
> Psw: **********
>
> Note: you have one year DbxPgSQL subscription starting from this date.
>
> Please write to [email protected] if you have any
> questions or problems with our product.
> Also you can post your comments to DbxPgSQL discussion
> forum that is available from http://devart.com/forums
>
> Devart Sales Team
> [email protected]
I trust this matter can be resolved quickly.
Regards,
Alex.
Last edited by ipai on Wed 23 Nov 2011 00:03, edited 1 time in total.