EN
C# / .NET - get timezone offset
0
points
In this article, we would like to show you how to get timezone offset in C#.
Quick solution:
TimeZoneInfo.Local.GetUtcOffset(DateTime.UtcNow);
Practical example
var offset = TimeZoneInfo.Local.GetUtcOffset(DateTime.UtcNow);
Console.WriteLine(offset);
Output:
01:00:00