/** * Adds the given amount to the given {@link Calendar} field and returns a new Timestamp * with the same precision as the original Timestamp. * @param field the field. * @param amount an amount. * @return a new Timestamp instance. */ private Timestamp calendarAdjust(int field, int amount) { if (amount == 0) return this; Timestamp ts = calendarAdd(field, amount, _precision); ts.clearUnusedPrecision(); return ts; }
Timestamp ts = addMillis(amount); ts._precision = _precision; ts.clearUnusedPrecision(); if (_precision.includes(Precision.SECOND)) {