I am using a segment with a timestamp where the block:
was prepared In the case of = c.prepareStatement ("Select the value from utctimestamp> gt; and utctimestamp
I have different results, when I have different time zones on the client computer Is this a bug in Oracle JDBC? Or right behavior?
The Oracle database version is 10.2 and I have tried with the oracle jdbc thin driver version 10.2 and 11.1.
The parameter is the timestamp, and I expected that no time conversion will be done on the way the database column type is DATE, but I checked it with the TIMESTAMP column type at the same time.
Is there a way to get the right result? I can not change the default timezone in UTC in the whole app.
Thank you for your help
The timestamp in the start date created in the UTC timezone To set the value,
stmt.setTimestamp (1, t, calendar.justinase (timezone.getmeMozone ("UTC"))
timestamp The value is always UTC, but always the JDBC driver can automatically send it to the server correctly. The third, the calendar, the parameter driver is the server They help in preparing properly.
Comments
Post a Comment