public BigDecimal getDecimalMillis() { if (_isNullValue()) { return null; } return _timestamp_value.getDecimalMillis(); }
public void setLocalOffset(Integer minutes) throws NullValueException { validateThisNotNull(); assert (_timestamp_value != null); setValue(_timestamp_value.getDecimalMillis(), minutes); }
public BigDecimal getDecimalMillis() { if (_isNullValue()) { return null; } return _timestamp_value.getDecimalMillis(); }
public BigDecimal getDecimalMillis() { if (_isNullValue()) { return null; } return _timestamp_value.getDecimalMillis(); }
public void setLocalOffset(Integer minutes) throws NullValueException { validateThisNotNull(); assert (_timestamp_value != null); setValue(_timestamp_value.getDecimalMillis(), minutes); }
public void setLocalOffset(Integer minutes) throws NullValueException { validateThisNotNull(); assert (_timestamp_value != null); setValue(_timestamp_value.getDecimalMillis(), minutes); }
/** * Returns a timestamp relative to this one by the given number of * milliseconds. * * @param amount a (positive or negative) number of milliseconds. */ public final Timestamp addMillis(long amount) { if (amount == 0) return this; // This strips off the local offset, expressing our fields as if they // were UTC. BigDecimal millis = make_localtime().getDecimalMillis(); millis = millis.add(BigDecimal.valueOf(amount)); Timestamp ts = new Timestamp(millis, _precision, _offset); // Anything with courser-than-millis precision will have been extended // to 3 decimal places due to use of getDecimalMillis(). Fix that. ts._fraction = _fraction; if (_offset != null && _offset != 0) { ts.apply_offset(_offset); } return ts; }
/** * Returns a timestamp relative to this one by the given number of * milliseconds. * * @param amount a (positive or negative) number of milliseconds. */ public final Timestamp addMillis(long amount) { if (amount == 0) return this; // This strips off the local offset, expressing our fields as if they // were UTC. BigDecimal millis = make_localtime().getDecimalMillis(); millis = millis.add(BigDecimal.valueOf(amount)); Timestamp ts = new Timestamp(millis, _precision, _offset); // Anything with courser-than-millis precision will have been extended // to 3 decimal places due to use of getDecimalMillis(). Fix that. ts._fraction = _fraction; if (_offset != null && _offset != 0) { ts.apply_offset(_offset); } return ts; }