the attached patch addresses TimeZone/DST issues in the 1.2.5 release of jTDS:
(this is an updated version of this patch for 1.2.2: relates to https://sourceforge.net/tracker/?func=detail&aid=2731952&group_id=33291&atid=407764 )
1) Time conversion with user supplied Calendars:
With default TimeZone "America/New_York", setting Timestamp 2009-03-08 02:00:00 with a UTC Calendar is converted to 2009-03-08 03:00:00 (note 03:00 instead of 02:00). This is because at that time the DST switch occurs and 02:00 in the zone America/New_York doesn't exist (01:59 -> 03:00).
The patch addresses this problem by creating DateTime instances directly upon calls such as PreparedStatement.setTimestamp(int, Timestamp, Calendar) and reading from DateTime instances directly in calls such as ResultSet.getTimestamp(int, Calendar).
PS: The data truncation part, which was included in the 1.2.2 patch, is not included in this 1.2.5 patch.