Skip to content

[Libraries][iOS/MacCatalyst/tvOS] IsIanaIdTest fails from mismatched expectation #58440

@mdh1418

Description

@mdh1418

In #57732, several TimeZoneInfoTests were tweaked to pass on iOS/MacCatalyst/tvOS. At the time, when running tests, America/Buenos_Aires was no recognized as an IanaID on iOS/MacCatalyst/tvOS, so that value was used instead of Pacific Standard Time which throws TimeZoneNotFound ahead of returning false for IsIanaId.

I'm not certain what is supposed to be a TimeZoneId and not IanaId on iOS/MacCatalyst/tvOS yet, and I'm not sure exactly what had changed between that change and the latest run on #57208 to cause it to no longer not be an IanaId.

The fix should simply be finding a known TimeZoneId on iOS/MacCatalyst/tvOS that is and will not be recognized as an IanaId.


From another glance with #58440 (comment), it appears that the failure is directly from this addition to the test

Assert.Equal((expected || TimeZoneInfo.Local.Id.Equals("Utc", StringComparison.OrdinalIgnoreCase)), TimeZoneInfo.Local.HasIanaId);

The newest check fails on iOS/MacCatalyst/tvOS as the TimeZoneInfo.Local.Id is America/New_York. The check expects for the TimeZoneInfo.Local.Id to be an Iana Id if the platform is NOT windows or if the Id is NOT UTC. It seems as though America/New_York is evaluated as not being an Iana Id.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions