Commit 022f6f0
committed
TimeZone.getPreviousTransition() should never return its input
getPreviousTransition() returns the last transition before the instant
passed into it, not the last transition before or equal to. Otherwise,
you would have to manually subtract a nanosecond in between each call if
you wanted to get a series of previous transitions.
Add similar tests for getNextTransition(), although that wasn't broken.
No change needed to the spec text or documentation, which are already
correct.1 parent 2c48cd3 commit 022f6f0
2 files changed
+13
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1902 | 1902 | | |
1903 | 1903 | | |
1904 | 1904 | | |
1905 | | - | |
| 1905 | + | |
1906 | 1906 | | |
1907 | 1907 | | |
1908 | 1908 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| 220 | + | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| |||
423 | 425 | | |
424 | 426 | | |
425 | 427 | | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
426 | 433 | | |
427 | 434 | | |
428 | 435 | | |
| |||
441 | 448 | | |
442 | 449 | | |
443 | 450 | | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
444 | 456 | | |
445 | 457 | | |
446 | 458 | | |
| |||
0 commit comments