Noda Time
GetSystemDefault Method
NamespacesNodaTimeIDateTimeZoneProviderGetSystemDefault()()()()
Gets the time zone from this provider that matches the system default time zone, if a matching time zone is available.
Declaration Syntax
C#Visual BasicVisual C++
DateTimeZone GetSystemDefault()
Function GetSystemDefault As DateTimeZone
DateTimeZone^ GetSystemDefault()
Return Value
The provider-specific representation of the system default time zone.
Remarks
Callers should be aware that this method will throw TimeZoneNotFoundException if no matching time zone is found. For the built-in Noda Time providers, this is unlikely to occur in practice (assuming the system is using a standard Windows time zone), but can occur even then, if no mapping is found. If it is necessary to handle this case, callers can construct a BclDateTimeZone via ForSystemDefault()()()(), which returns a DateTimeZone that wraps the system local TimeZoneInfo, and which always succeeds.
Exceptions
ExceptionCondition
TimeZoneNotFoundExceptionThe system default time zone is not mapped by this provider.

Assembly: NodaTime (Module: NodaTime) Version: 1.0.0.0 (1.0.1)