DateTimeZone ForOffset Method Noda Time
Returns a fixed time zone with the given offset.

Namespace: NodaTime
Assembly: NodaTime (in NodaTime.dll) Version: 1.3.0.0 (1.3.1)
Syntax

public static DateTimeZone ForOffset(
	Offset offset
)

Parameters

offset
Type: NodaTime Offset
The offset for the returned time zone

Return Value

Type: DateTimeZone
A fixed time zone with the given offset.
Remarks

The returned time zone will have an ID of "UTC" if the offset is zero, or "UTC+/-Offset" otherwise. In the former case, the returned instance will be equal to Utc.

Note also that this method is not required to return the same DateTimeZone instance for successive requests for the same offset; however, all instances returned for a given offset will compare as equal.

Version Information

Available since: 1.0.0
Supported in the PCL? Yes
See Also