//-----------------------------------------------------------------------
@Override
public ChronoZonedDateTime<D> with(TemporalField field, long newValue) {
if (field instanceof ChronoField) {
ChronoField f = (ChronoField) field;
switch (f) {
case INSTANT_SECONDS: return plus(newValue - toEpochSecond(), SECONDS);
case OFFSET_SECONDS: {
ZoneOffset offset = ZoneOffset.ofTotalSeconds(f.checkValidIntValue(newValue));
return create(dateTime.toInstant(offset), zone);
}
}
return ofBest(dateTime.with(field, newValue), zone, offset);
}