Daylight savings bug with timestamptz field

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for PostgreSQL in Delphi and C++Builder
Post Reply
ipai
Posts: 18
Joined: Mon 01 Nov 2010 00:46

Daylight savings bug with timestamptz field

Post by ipai » Tue 11 Oct 2011 05:54

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.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Tue 11 Oct 2011 11:45

Hello,

Please specify the timezone settings of your server (you can see them in the postgresql.conf configuration file) and also specify the result of execution of the following query:

select now()

ipai
Posts: 18
Joined: Mon 01 Nov 2010 00:46

Post by ipai » Tue 11 Oct 2011 12:32

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.

ipai
Posts: 18
Joined: Mon 01 Nov 2010 00:46

Post by ipai » Tue 11 Oct 2011 18:49

AlexP wrote:and also specify the result of execution of the following query:

select now()
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.

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.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Fri 14 Oct 2011 06:23

Hello,

Thank you for the information.
We have reproduced the problem.
We will try to fix it in the nearest product version.

ipai
Posts: 18
Joined: Mon 01 Nov 2010 00:46

Post by ipai » Fri 14 Oct 2011 12:30

Thanks for that, Alex.

Is there any possibility of a patch or quick work-around while we're waiting for the official fix? As I said in my original e-mail, this is a significant problem for us because it is affecting live customers.

Please let me know ASAP.

Thanks,

Alex.

ipai
Posts: 18
Joined: Mon 01 Nov 2010 00:46

Post by ipai » Mon 24 Oct 2011 22:10

Has there been any progress on this issue? It is currently affecting all of our Australian and New Zealand sites and we need a fix urgently.

Thanks,

Alex.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Tue 25 Oct 2011 09:49

Hello,

We've fixed this problem.
Please specify your license number and e-mail address to which we can send you the product with the fix.

ipai
Posts: 18
Joined: Mon 01 Nov 2010 00:46

Post by ipai » Tue 25 Oct 2011 23:58

Thanks, Alex!

Our license number is CRDBM-00383

Please e-mail the fix to alex.ip(at)abri.une.edu.au

Regards,

Alex.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Thu 27 Oct 2011 06:38

Hello,

You've specified dbExpress driver for MySQL license. Please specify the license for dbExpress driver for PostgreSQL so that I could send you the fixed version.

ipai
Posts: 18
Joined: Mon 01 Nov 2010 00:46

Post by ipai » Tue 22 Nov 2011 04:49

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.
Last edited by ipai on Wed 23 Nov 2011 00:03, edited 1 time in total.

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Tue 20 Dec 2011 15:00

Hello

This issue was fixed and this fix was included in the latest release of dbExpress driver for PostgreSQL (ver. 2.1.2).

Post Reply