fml, they broke all names

This commit is contained in:
13xforever 2019-11-06 05:12:44 +05:00
parent 5162953468
commit 8c50ecddaa

View File

@ -34,13 +34,12 @@ namespace CompatBot.Utils
var result = new Dictionary<string, TimeZoneInfo>();
foreach (var tzi in tzList)
{
Config.Log.Debug($"[TZI] Checking {tzi.Id} ({tzi.StandardName} / {tzi.DaylightName})");
if (uniqueNames.Contains(tzi.StandardName) || uniqueNames.Contains(tzi.DaylightName))
Config.Log.Debug($"[TZI] Checking {tzi.Id} ({tzi.DisplayName} / {tzi.StandardName} / {tzi.DaylightName})");
if (uniqueNames.Contains(tzi.StandardName) || uniqueNames.Contains(tzi.DaylightName) || uniqueNames.Contains(tzi.DisplayName))
{
Config.Log.Debug("[TZI] Looks like it's a match!");
var acronyms = from tza in TimeZoneAcronyms
where tza.Value.Any(name => name.Equals(tzi.StandardName, StringComparison.InvariantCultureIgnoreCase))
|| tza.Value.Any(name => name.Equals(tzi.DaylightName, StringComparison.InvariantCulture))
where tza.Value.Contains(tzi.StandardName) || tza.Value.Contains(tzi.DaylightName) || tza.Value.Contains(tzi.DisplayName)
select tza.Key;
Config.Log.Debug("[TZI] Matched acronyms: " + string.Join(", ", acronyms));
foreach (var tza in acronyms)