I am using PreparedStatement with Timestamp in where clause:
PreparedStatement s=c.prepareStatement(\"select value,utctimestamp from t where utctimestamp>
To set a timestamp value in a PreparedStatement in UTC timezone one should use
stmt.setTimestamp(1, t, Calendar.getInstance(TimeZone.getTimeZone("UTC")))
The Timestamp value is always UTC, but not always the jdbc driver can automatically sent it correctly to the server. The third, Calendar, parameter helps the driver to correctly prepare the value for the server.