(
TimeSource<?> clock,
AttributeQuery attributes
)
| 2371 | } |
| 2372 | |
| 2373 | @Override |
| 2374 | public PlainDate createFrom( |
| 2375 | TimeSource<?> clock, |
| 2376 | AttributeQuery attributes |
| 2377 | ) { |
| 2378 | |
| 2379 | Timezone zone; |
| 2380 | |
| 2381 | if (attributes.contains(Attributes.TIMEZONE_ID)) { |
| 2382 | zone = Timezone.of(attributes.get(Attributes.TIMEZONE_ID)); |
| 2383 | } else if (attributes.get(Attributes.LENIENCY, Leniency.SMART).isLax()) { |
| 2384 | zone = Timezone.ofSystem(); |
| 2385 | } else { |
| 2386 | return null; |
| 2387 | } |
| 2388 | |
| 2389 | final UnixTime ut = clock.currentTime(); |
| 2390 | return PlainDate.from(ut, zone.getOffset(ut)); |
| 2391 | |
| 2392 | } |
| 2393 | |
| 2394 | @Override |
| 2395 | public PlainDate createFrom( |
nothing calls this directly
no test coverage detected