Currently, using JDBC, if I want to set a database column to a timestamp value and have the database interpret it as a UTC timestamp, I would do this:
PreparedStatement pst = connection.prepareStatement(sql);
pst.setTimestamp(1, timestampValue, Calendar.getInstance(TimeZone.getTimeZone("UTC"));
but now I want to do the same thing but for an array of Timestamps:
pst.setArray(1, timestampValues);
where timestampValues is an array of Timestamps (and the database column is of type "timestamp[]" e.g in Postgresql. I don't see where I can specify to the JDBC driver that each Timestamp value in the array has to be treated as UTC?