private TimeZoneInfoEx(TZI source) { _source = source; Name = source.Name; StandardName = source.StandardName; DaylightName = source.DaylightName; BaseUtcOffset = source.BaseUtcOffset; }
public static TimeZoneInfoEx GetLocalTimeZone() { var name = TZI.GetLocalTimeStandardName(); // get the id from the standard name var id = _timeZoneData.Value.Values.First(tzi => tzi.StandardName == name); return(FindSystemTimeZoneById(id.Name)); }
private static IDictionary <string, TimeZoneInfoEx> FillData() { return(TZI.CreateMap().Values.Select(tz => new TimeZoneInfoEx(tz)).ToDictionary(tz => tz.Name)); }