Skip to content
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

Implementation of timezone databases for Darwin in Kotlin #327

Merged
merged 8 commits into from
Feb 26, 2024

Conversation

dkhalanskyjb
Copy link
Collaborator

@dkhalanskyjb dkhalanskyjb commented Dec 1, 2023

This almost works. The only issue is that, in the iOS Simulator only, not on actual devices, NSTimeZone and kotlinx.datetime.TimeZone use different timezone databases with this implementation, so there are some differences between them. During my testing, there was one extra timezone that our library recognized but NSTimeZone didn't, breaking TimeZone.toNSTimeZone() occasionally.

HowardHinnant/date#577 suggests a solution. I tried to implement it, and I think I'm accessing the correct paths, but for some reason, this still doesn't work.

Maybe I'll have to dig into what timezone database iOS Simulator actually uses, or maybe I made a mistake somewhere and will just need to fix our code.

EDIT: turns out, the problem goes beyond different timezone databases, so we'll have to live with it.

@dkhalanskyjb
Copy link
Collaborator Author

@ilya-g, I've rewritten the history to separate the concerns better.

@dkhalanskyjb dkhalanskyjb merged commit d58a4aa into master Feb 26, 2024
1 check passed
@dkhalanskyjb dkhalanskyjb deleted the pureKotlinDarwin branch February 26, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
timezone The model and API of timezones
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants