Пример #1
0
        public void TimeZoneConverterTest(string input, string utcInput)
        {
            var utc = DateTime.Parse(utcInput).Normalize();

            Assert.That(TimeParser.TryParse(input, out var result), Is.True, $"{input} failed to parse\nSupported time zones: {string.Join(", ", TimeParser.GetSupportedTimeZoneAbbreviations())}");
            Assert.That(result, Is.EqualTo(utc));
            Assert.That(result.Kind, Is.EqualTo(DateTimeKind.Utc));
        }