Get time difference between the current time zone's standard time and Coordinated Universal Time (UTC) in CSharp
Description
The following code shows how to get time difference between the current time zone's standard time and Coordinated Universal Time (UTC).
Example
//from w w w. j a v a 2 s . c om
using System;
public class MainClass{
public static void Main(String[] argv){
TimeZoneInfo localZone = TimeZoneInfo.Local;
Console.WriteLine(localZone.BaseUtcOffset.Hours);
}
}
The code above generates the following result.