Skip to content

SR-8078: Some time zone identifiers are not supported by TimeZone on Linux #1616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2018

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Jun 23, 2018

  • TimeZone.knownTimeZoneIdentifiers was returning time zone names
    that could not be instantiated by TimeZone(identifier:) due to
    CFTimeZone.c:__nameStringOK() filtering out some names.

  • Make CFTimeZoneCopyKnownNames(), used by .knownTimeZoneIdentifiers,
    also filter these names using __nameStringOK().

  • __nameStringOK calls ICU function ucal_getCanonicalTimeZoneID
    which ultimately decides if the time zone is valid.

https://bugs.swift.org/browse/SR-8078

…Linux

- TimeZone.knownTimeZoneIdentifiers was returning time zone names
  that could not be instantiated by TimeZone(identifier:) due to
  CFTimeZone.c:__nameStringOK() filtering out some names.

- Make CFTimeZoneCopyKnownNames(), used by .knownTimeZoneIdentifiers,
  also filter these names using __nameStringOK().

- __nameStringOK calls ICU function ucal_getCanonicalTimeZoneID
  which ultimately decides if the time zone is valid.
@spevans
Copy link
Contributor Author

spevans commented Jun 23, 2018

@swift-ci please test

@spevans spevans requested a review from parkera June 23, 2018 16:48
@alblue
Copy link
Contributor

alblue commented Jun 26, 2018

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants