@@ -260,7 +260,7 @@ public <T extends Temporal & Comparable<? super T>> T elapseUntil(T temporal, in
260
260
* Roll forward the give temporal until it reaches the next higher
261
261
* order field. Calling this method is equivalent to calling
262
262
* {@link #elapseUntil(Temporal, int)} with goal set to the
263
- * minimum value of this field's range, except for daylight saving .
263
+ * minimum value of this field's range.
264
264
* @param temporal the temporal to roll forward
265
265
* @param <T> the type of temporal
266
266
* @return the rolled forward temporal
@@ -269,10 +269,12 @@ public <T extends Temporal & Comparable<? super T>> T rollForward(T temporal) {
269
269
int current = get (temporal );
270
270
ValueRange range = temporal .range (this .field );
271
271
long amount = range .getMaximum () - current + 1 ;
272
- T result = this .field .getBaseUnit ().addTo (temporal , amount );
273
- //adjust daylight saving
274
- if (get (result ) != range .getMinimum ()) {
275
- result = this .field .adjustInto (result ,result .range (this .field ).getMinimum ());
272
+ T result = this .field .getBaseUnit ().addTo (temporal , amount );
273
+ current = get (result );
274
+ range = result .range (this .field );
275
+ // adjust for daylight savings
276
+ if (current != range .getMinimum ()) {
277
+ result = this .field .adjustInto (result , range .getMinimum ());
276
278
}
277
279
return result ;
278
280
}
0 commit comments