Java ResultSet how to getTimeStamp in UTC
- by mkal
The database has data in UTC and when I try to get data
java.util.Calendar cal = Calendar.getInstance();
cal.setTimeZone(TimeZone.getTimeZone("UTC"));
java.sql.Timestamp ts = resultSet.getTimestamp(PUBLISH_TIME);
cal.setTime(ts);
Is there anything wrong with this?