Skip to content

TimeZone: delegate to ICU on Windows #2686

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
Feb 22, 2020

Conversation

compnerd
Copy link
Member

Unfortunately, Windows does not have full time zone information
available. For many cases we can make do with the system information,
augmented with alternate names (the Olson-to-Windows conversion
database). This papers over the inability to deserialize the full
information in the registry by falling back to ICU to get the
information for the DST time conversion.

@@ -1679,18 +1679,34 @@ CFTimeInterval CFTimeZoneGetDaylightSavingTimeOffset(CFTimeZoneRef tz, CFAbsolut
return 0.0;
}

extern UCalendar *__CFCalendarCreateUCalendar(CFStringRef calendarID, CFStringRef localeID, CFTimeZoneRef tz);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be CF_PRIVATE? what's the tag on that function?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, it was just moved up from below in the same file. Pretty sure its meant to be private.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, I just saw the removal under it.

Unfortunately, Windows does not have full time zone information
available.  For many cases we can make do with the system information,
augmented with alternate names (the Olson-to-Windows conversion
database).  This papers over the inability to deserialize the full
information in the registry by falling back to ICU to get the
information for the DST time conversion.
@millenomi
Copy link
Contributor

Otherwise approved.

@millenomi
Copy link
Contributor

@swift-ci please test Linux platform

@@ -1679,18 +1679,34 @@ CFTimeInterval CFTimeZoneGetDaylightSavingTimeOffset(CFTimeZoneRef tz, CFAbsolut
return 0.0;
}

extern UCalendar *__CFCalendarCreateUCalendar(CFStringRef calendarID, CFStringRef localeID, CFTimeZoneRef tz);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, I just saw the removal under it.

@compnerd compnerd merged commit a0c62ac into swiftlang:master Feb 22, 2020
@compnerd compnerd deleted the delegating-muscle branch February 22, 2020 16:06
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.

2 participants