Re: Driver behaves differently with prepareThreshold and timestamp fields when daylights is active (was Re: Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102)

From: Edson Richter <edsonrichter(at)hotmail(dot)com>
To: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Driver behaves differently with prepareThreshold and timestamp fields when daylights is active (was Re: Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102)
Date: 2016-01-11 22:44:34
Message-ID: COL131-W78090D9F617DD3A4A03AC3CFC90@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

> Date: Tue, 12 Jan 2016 01:31:37 +0300
> Subject: Re: Driver behaves differently with prepareThreshold and timestamp fields when daylights is active (was Re: [JDBC] Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102)
> From: sitnikov(dot)vladimir(at)gmail(dot)com
> To: edsonrichter(at)hotmail(dot)com; pgsql-jdbc(at)postgresql(dot)org
>
> Here's the fix:
> https://github.com/pgjdbc/pgjdbc/commit/642b48a787098a6c5a068710bdbbf9f1b11f3aac
>
> You can try it via Maven Central's <version>9.4.1208-SNAPSHOT</version>

Uau, that was fast!!!
I'll try to download a build, and then test the fix.

>
>
> I wonder if there is anybody from Portugal on the list?
> Can you explain how you represent 2000-03-26 00:00:00?

I'm on Brazil, and we are on DST right now. In Brazil, "2000-03-26 00:00:00" would be better shown as "26/03/2000 00:00:00".


Regards,

Edson

>
> As far as I understand, somewhere near 26th March Atlantic/Azores
> skips from 00:00:00 to 01:00:00.
> See http://www.timeanddate.com/time/change/portugal/ponta-delgada-azores
> for 2000-03-26 00:00:00 -> 01:00:00
>
> This causes troubles since java.util.Date is supposed to be 2000-03-26
> 00:00:00 Atlantic/Azores, however there is no such thing like
> "2000-03-26 00:00:00 Atlantic/Azores" in Java.
> If you try to use calendar.set(Calendar.HOUR_OF_DAY, 0), then you get
> 01:00:00 back.
>
> This caused me to add exception to the expected results:
> https://github.com/pgjdbc/pgjdbc/commit/642b48a787098a6c5a068710bdbbf9f1b11f3aac#diff-b318f589843d60530d1eada03263c1b0R895
>
> Vladimir

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Elvis Pranskevichus 2016-01-11 22:56:32 pg_dump fails on domain constraint comments
Previous Message Vladimir Sitnikov 2016-01-11 22:35:00 Re: Driver behaves differently with prepareThreshold and timestamp fields when daylights is active (was Re: Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102)

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thomas Kellerer 2016-01-12 09:03:41 Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102
Previous Message Vladimir Sitnikov 2016-01-11 22:35:00 Re: Driver behaves differently with prepareThreshold and timestamp fields when daylights is active (was Re: Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102)