ITimeZoneIDConverterTryConvertToUtcOffset Method
Tries to convert a
String, which represents a time zone
name (IANA time zone ID), into a UTC offset belonging to this time zone.
Namespace: FolkerKinzel.VCardsAssembly: FolkerKinzel.VCards (in FolkerKinzel.VCards.dll) Version: 8.1.0+9753915cd0f8006e7e5b4f62aa63aa3651006f06
bool TryConvertToUtcOffset(
string timeZoneID,
out TimeSpan utcOffset
)
Function TryConvertToUtcOffset (
timeZoneID As String,
<OutAttribute> ByRef utcOffset As TimeSpan
) As Boolean
bool TryConvertToUtcOffset(
String^ timeZoneID,
[OutAttribute] TimeSpan% utcOffset
)
abstract TryConvertToUtcOffset :
timeZoneID : string *
utcOffset : TimeSpan byref -> bool
- timeZoneID String
- A String representing the name of a
time zone.
- utcOffset TimeSpan
- Contains the UTC offset after the method has been successfully
returned. The argument is passed uninitialized.
Booleantrue, if
timeZoneID could be converted
into a UTC offset, otherwise
false.
The TryConvertToUtcOffset(String, TimeSpan) method should
at least be able to convert IANA time zone IDs into UTC offsets. (You could
also convert POSIX time zone identifiers, for example.) It makes sense to use a
3rd-party NuGet package for the task, as .NET is currently not able to do this
itself.
It is not necessary for the method to convert Strings that already
represent a UTC offset, since the library FolkerKinzel.VCards
already does this itself.