Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WvamY-0005Sk-MY for pgsql-odbc@arkaria.postgresql.org; Fri, 13 Jun 2014 23:21:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WvamX-0006mE-5T for pgsql-odbc@arkaria.postgresql.org; Fri, 13 Jun 2014 23:21:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WvamW-0006lw-5g for pgsql-odbc@postgresql.org; Fri, 13 Jun 2014 23:21:12 +0000 Received: from relay01.embarcadero.com ([207.211.86.99]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WvamR-000367-Es for pgsql-odbc@postgresql.org; Fri, 13 Jun 2014 23:21:09 +0000 X-ASG-Debug-ID: 1402701665-07677f11b47fe800001-LBb6yW Received: from ETNACAS02.embarcadero.com ([10.50.102.98]) by relay01.embarcadero.com with ESMTP id zPseUENnhX7iBrRQ; Fri, 13 Jun 2014 16:21:05 -0700 (PDT) X-Barracuda-Envelope-From: Walter.Couto@EMBARCADERO.COM Received: from ETNAMAIL01.embarcadero.com ([169.254.1.148]) by ETNACAS02.embarcadero.com ([::1]) with mapi id 14.02.0342.003; Fri, 13 Jun 2014 16:20:35 -0700 From: Walter Couto To: Hiroshi Inoue CC: David Johnston , Adrian Klaver , "pgsql-odbc@postgresql.org" Subject: Re: Re: Inconsistency between JDBC and ODBC drivers when dealing with TIMESTAMP WITH TIME ZONE Thread-Topic: [ODBC] Re: Inconsistency between JDBC and ODBC drivers when dealing with TIMESTAMP WITH TIME ZONE X-ASG-Orig-Subj: Re: [ODBC] Re: Inconsistency between JDBC and ODBC drivers when dealing with TIMESTAMP WITH TIME ZONE Thread-Index: Ac+EFPlms5zWeR6ZQu+lSCCZTXXoWgAZz4oA//+mEMaAAIxGAIAAD8iAgAANs4D//9Hc1oABqGUA//+Lv1mABM+FAP//nmIc Date: Fri, 13 Jun 2014 23:20:34 +0000 Message-ID: <55ricaqbb5ifoardru24428g.1402701657114@email.android.com> References: <7FA4F9E5512F214C801E596ECD8790E066A82A9A@ETNAMAIL01.embarcadero.com> <1402359526172-5806595.post@n5.nabble.com> <7FA4F9E5512F214C801E596ECD8790E066A82D32@ETNAMAIL01.embarcadero.com> <53967920.3090308@aklaver.com> <5396865D.7080506@tpf.co.jp>, <7FA4F9E5512F214C801E596ECD8790E066A83019@ETNAMAIL01.embarcadero.com>, <5397CF28.1020503@tpf.co.jp> , <539B76B6.8020902@tpf.co.jp> In-Reply-To: <539B76B6.8020902@tpf.co.jp> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: multipart/alternative; boundary="_000_55ricaqbb5ifoardru24428g1402701657114emailandroidcom_" MIME-Version: 1.0 X-Barracuda-Connect: UNKNOWN[10.50.102.98] X-Barracuda-Start-Time: 1402701665 X-Barracuda-URL: http://relay01.embarcadero.com:8000/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at embarcadero.com X-Barracuda-Spam-Score: 0.14 X-Barracuda-Spam-Status: No, SCORE=0.14 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=CN_BODY_332, HTML_MESSAGE, THREAD_INDEX, THREAD_TOPIC X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.6630 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.01 THREAD_INDEX thread-index: AcO7Y8iR61tzADqsRmmc5wNiFHEOig== 0.01 THREAD_TOPIC Thread-Topic: ...(Japanese Subject)... 0.12 CN_BODY_332 BODY: CN_BODY_332 0.00 HTML_MESSAGE BODY: HTML included in message X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org --_000_55ricaqbb5ifoardru24428g1402701657114emailandroidcom_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I vote to leave the timestamp in the server's time zone. Maybe a driver opt= ion can be added in future to allow the user to choose between local and se= rver. On the string format, Microsoft has timestamp with timezone formats and old= drivers or the new ones when you ask for the string will gives you the tim= e zone in hh:mm. Teradata, Oracle and DB2 also return this format if the re= sult is a string. I believe they all also clip the timezone (don't convert = to local timezone) if you as for it as a SQL_TIMESTAMP. Walter -------- Original message -------- From: Hiroshi Inoue Date:06/13/2014 6:09 PM (GMT-05:00) To: Walter Couto Cc: David Johnston ,Adrian Klaver ,pgsql-odbc@postgresql.org Subject: Re: [ODBC] Re: Inconsistency between JDBC and ODBC drivers when de= aling with TIMESTAMP WITH TIME ZONE Hi Walter and all, While reading the old and disabled code, I remembered the circumstances back then a little. Psqlodbc had followed the formatting rule e.g. described at the last line in http://msdn.microsoft.com/en-us/library/ms712387%28v=3Dvs.85%29.aspx =2E Also look at http://msdn.microsoft.com/en-us/library/ms712360%28v=3Dvs.85%29.aspx =2E There's no time zone in ODBC world and I'm afraid the possibility that some applications are broken by adding time zone expression. So please vote which way to choose? 1. Keep the current behavior, i.e. simply drop the time zone part from server's output if exists. 2. Use local time zone instead of server time zone but omit the time zone expression. 3. Use local time zone with the time zone expression when the data type is TIMESTAMP WITH TIME ZONE. 4. The others. Anyway I attached a patch which implements the above 3. It's easy to change to 2. regarts, Hiroshi Inoue > Walter > > > -------- Original message -------- > From: "Inoue, Hiroshi" > Date:06/10/2014 11:39 PM (GMT-05:00) > To: Walter Couto ,David Johnston > Cc: Adrian Klaver ,pgsql-odbc@postgresql.org > Subject: Re: [ODBC] Re: Inconsistency between JDBC and ODBC drivers when > dealing with TIMESTAMP WITH TIME ZONE > > Hi Walter, > > I would enable time zone related code and complete the coding. > When I make a patch, could you test it? CONFIDENTIALITY NOTICE: This email message is for the sole use of the inten= ded recipient(s) and may contain confidential and privileged information. A= ny unauthorized review, use, disclosure or distribution is prohibited. If y= ou are not the intended recipient, please contact the sender by reply email= and destroy all copies of the original message.=0D --_000_55ricaqbb5ifoardru24428g1402701657114emailandroidcom_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I vote to leave the timestamp in the server's time zone. Maybe a drive= r option can be added in future to allow the user to choose between local a= nd server.

On the string format, Microsoft has timestamp with timezone formats an= d old drivers or the new ones when you ask for the string will gives you th= e time zone in hh:mm. Teradata, Oracle and DB2 also return this format if t= he result is a string. I believe they all also clip the timezone (don't convert to local timezone) if you a= s for it as a SQL_TIMESTAMP. 

Walter


-------- Original message --------
From: Hiroshi Inoue
Date:06/13/2014 6:09 PM (GMT-05:00)
To: Walter Couto
Cc: David Johnston ,Adrian Klaver ,pgsql-odbc@postgresql.org
Subject: Re: [ODBC] Re: Inconsistency between JDBC and ODBC drivers when de= aling with TIMESTAMP WITH TIME ZONE

Hi Walter and all,

While reading the old and disabled code, I remembered the circumstances
back then a little.
Psqlodbc had followed the formatting rule e.g. described at the last
line in
  http://msdn.microsoft.com/en-us/library/ms712387%28v=3Dvs.85%2= 9.aspx
.
Also look at
  http://msdn.microsoft.com/en-us/library/ms712360%28v=3Dvs.85%2= 9.aspx
.
There's no time zone in ODBC world and I'm afraid the possibility
that some applications are broken by adding time zone expression.

So please vote which way to choose?

1. Keep the current behavior, i.e. simply drop the time zone part
    from server's output if exists.
2. Use local time zone instead of server time zone but omit the time
    zone expression.
3. Use local time zone with the time zone expression when the data
    type is TIMESTAMP WITH TIME ZONE.
4. The others.

Anyway I attached a patch which implements the above 3.
It's easy to change to 2.

regarts,
Hiroshi Inoue

> Walter
>
>
> -------- Original message --------
> From: "Inoue, Hiroshi"
> Date:06/10/2014 11:39 PM (GMT-05:00)
> To: Walter Couto ,David Johnston
> Cc: Adrian Klaver ,pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Re: Inconsistency between JDBC and ODBC drivers wh= en
> dealing with TIMESTAMP WITH TIME ZONE
>
> Hi Walter,
>
> I would enable time zone related code and complete the coding.
> When I make a patch, could you test it?


CONFIDENTIALITY NOTICE: This email message is for the sole use of the i= ntended recipient(s) and may contain confidential and privileged informatio= n. Any unauthorized review, use, disclosure or distribution is prohibited. = If you are not the intended recipient, please contact the sender by reply e= mail and destroy all copies of the original message.=0D   ­­   --_000_55ricaqbb5ifoardru24428g1402701657114emailandroidcom_--