Language

ZoneRules.GetDaylightSavings(Instant) Method

Definition

Gets the amount of daylight savings in use for the specified instant in this zone.

[Android.Runtime.Register("getDaylightSavings", "(Ljava/time/Instant;)Ljava/time/Duration;", "", ApiSince=26)]
public Java.Time.Duration? GetDaylightSavings(Java.Time.Instant? instant);
[<Android.Runtime.Register("getDaylightSavings", "(Ljava/time/Instant;)Ljava/time/Duration;", "", ApiSince=26)>]
member this.GetDaylightSavings : Java.Time.Instant -> Java.Time.Duration

Parameters

instant
Instant

The instant to find the daylight savings for. Fixed-offset rules may ignore null; variable rules do not.

Returns

The difference between the standard offset and the actual offset in use at the specified instant.

Attributes

Exceptions

Thrown if instant is null and the rules are not fixed-offset.

Remarks

Gets the amount of daylight savings in use for the specified instant in this zone. This provides access to historic information on how the amount of daylight savings has changed over time. This is the difference between the standard offset and the actual offset. Typically the amount is zero during winter and one hour during summer. Time-zones are second-based, so the nanosecond part of the duration will be zero. This default implementation calculates the duration from the actual and standard offsets.

Java reference for java.time.zone.ZoneRules.getDaylightSavings.

Applies to