c# datetimeoffset get timezone code example Example: c# get offset from timezone var offset = TimeZoneInfo.Local.GetUtcOffset(DateTime.UtcNow);