[monotouch-test] Use the same timezone for the calendar as we do for the time (UTC) in CalendarTest.DateComponentsTest. Fixes #xamarin/maccore@2481. (#12304)

Fixes https://github.com/xamarin/maccore/issues/2481.
This commit is contained in:
Rolf Bjarne Kvinge 2021-07-30 16:02:36 +02:00 коммит произвёл GitHub
Родитель 0baef3c43f
Коммит 3766cf8fa2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -26,7 +26,7 @@ namespace MonoTouchFixtures.Foundation {
var now = DateTime.UtcNow;
NSDateComponents comps;
cal.TimeZone = NSTimeZone.FromName ("Europe/Madrid");
cal.TimeZone = NSTimeZone.FromName ("UTC");
comps = cal.Components (NSCalendarUnit.Year | NSCalendarUnit.Month | NSCalendarUnit.Day, (NSDate) now);
Assert.AreEqual ((nint) now.Year, comps.Year, "a year");
Assert.AreEqual ((nint) now.Month, comps.Month, "a month");