public Timestamp encodeTimestamp(java.sql.Timestamp value, Calendar cal, boolean invertTimeZone){ if (cal == null) { return value; } else { long time = value.getTime() + (invertTimeZone ? -1 : 1) * (cal.getTimeZone().getRawOffset() - Calendar.getInstance().getTimeZone().getRawOffset());  return new Timestamp(time); }
public Timestamp encodeTimestamp(java.sql.Timestamp value, Calendar cal){ return encodeTimestamp(value, cal, false);
    public Timestamp encodeTimestamp(java.sql.Timestamp value, Calendar cal, boolean invertTimeZone){        if (cal == null) {            return value;        }        else {            long time = value.getTime() +                 (invertTimeZone ? -1 : 1) * (cal.getTimeZone().getRawOffset() -                 Calendar.getInstance().getTimeZone().getRawOffset());                        return new Timestamp(time);        }    }