From 8c50ecddaa949cc1c25070af464f6cbf7c2a2da6 Mon Sep 17 00:00:00 2001 From: 13xforever Date: Wed, 6 Nov 2019 05:12:44 +0500 Subject: [PATCH] fml, they broke all names --- CompatBot/Utils/TimeParser.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CompatBot/Utils/TimeParser.cs b/CompatBot/Utils/TimeParser.cs index 98d06b61..d7d80225 100644 --- a/CompatBot/Utils/TimeParser.cs +++ b/CompatBot/Utils/TimeParser.cs @@ -34,13 +34,12 @@ namespace CompatBot.Utils var result = new Dictionary(); 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)