[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:
Родитель
0baef3c43f
Коммит
3766cf8fa2
|
@ -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");
|
||||
|
|
Загрузка…
Ссылка в новой задаче