mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8283681: Improve ZonedDateTime offset handling
Reviewed-by: scolebourne, naoto, rriggs
This commit is contained in:
parent
2600f99fec
commit
7bac0a878d
5 changed files with 156 additions and 4 deletions
|
@ -178,6 +178,11 @@ final class ZoneRegion extends ZoneId implements Serializable {
|
|||
return (rules != null ? rules : ZoneRulesProvider.getRules(id, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
/* package-private */ ZoneOffset getOffset(long epochSecond) {
|
||||
return getRules().getOffset(Instant.ofEpochSecond(epochSecond));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
/**
|
||||
* Writes the object using a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue