TimeZoneInfo.GetUtcOffset Method (DateTimeOffset)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Calculates the offset or difference between the time in this time zone and Coordinated Universal Time (UTC) for a particular date and time.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- dateTimeOffset
- Type: System.DateTimeOffset
The date and time to determine the offset for.
Return Value
Type: System.TimeSpanA TimeSpan object that indicates the time difference between Coordinated Universal Time (UTC) and the current time zone.
The returned time span includes any differences due to the application of adjustment rules to the current time zone. It differs from the BaseUtcOffset property, which returns the difference between Coordinated Universal Time (UTC) and the time zone's standard time and, therefore, does not take adjustment rules into account.
Version Notes
XNA Framework
When this method is used in the XNA Framework, it throws a NotSupportedException exception.