(
TimeSource<?> clock,
final AttributeQuery attributes
)
| 3329 | } |
| 3330 | |
| 3331 | @Override |
| 3332 | public PlainTime createFrom( |
| 3333 | TimeSource<?> clock, |
| 3334 | final AttributeQuery attributes |
| 3335 | ) { |
| 3336 | |
| 3337 | Timezone zone; |
| 3338 | |
| 3339 | if (attributes.contains(Attributes.TIMEZONE_ID)) { |
| 3340 | zone = Timezone.of(attributes.get(Attributes.TIMEZONE_ID)); |
| 3341 | } else if (attributes.get(Attributes.LENIENCY, Leniency.SMART).isLax()) { |
| 3342 | zone = Timezone.ofSystem(); |
| 3343 | } else { |
| 3344 | return null; |
| 3345 | } |
| 3346 | |
| 3347 | final UnixTime ut = clock.currentTime(); |
| 3348 | return PlainTime.from(ut, zone.getOffset(ut)); |
| 3349 | |
| 3350 | } |
| 3351 | |
| 3352 | // Löst bevorzugt Elemente auf, die in Format-Patterns vorkommen |
| 3353 | @Override |
nothing calls this directly
no test coverage detected