-
Notifications
You must be signed in to change notification settings - Fork 101
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dkhalanskyjb
force-pushed
the
pureKotlinDarwin
branch
from
December 1, 2023 17:34
acb34ed
to
92c615c
Compare
dkhalanskyjb
force-pushed
the
pureKotlinLinux
branch
from
December 11, 2023 15:39
e7c1318
to
e3f4d59
Compare
dkhalanskyjb
force-pushed
the
pureKotlinDarwin
branch
from
December 11, 2023 15:40
ca3a699
to
6448e6f
Compare
dkhalanskyjb
force-pushed
the
pureKotlinLinux
branch
from
December 11, 2023 15:42
e3f4d59
to
d86065c
Compare
dkhalanskyjb
force-pushed
the
pureKotlinDarwin
branch
from
December 11, 2023 15:43
6448e6f
to
6b24e5e
Compare
dkhalanskyjb
force-pushed
the
pureKotlinDarwin
branch
from
December 12, 2023 09:46
6b24e5e
to
7d8769f
Compare
dkhalanskyjb
force-pushed
the
pureKotlinDarwin
branch
from
December 14, 2023 12:44
fcdf35e
to
8f2bf15
Compare
dkhalanskyjb
force-pushed
the
pureKotlinDarwin
branch
from
February 20, 2024 14:50
abe00fd
to
dd85c06
Compare
dkhalanskyjb
force-pushed
the
pureKotlinDarwin
branch
from
February 21, 2024 15:12
dd85c06
to
38650e6
Compare
@ilya-g, I've rewritten the history to separate the concerns better. |
Using the official implementation of tzinfo as a reference.
It seems like the only reason to use NSDate.date() is to obtain an object. The POSIX implementation is more accurate.
Now, not everything will break, but only the calls to timezone facilities.
dkhalanskyjb
force-pushed
the
pureKotlinDarwin
branch
from
February 21, 2024 15:55
07d3270
to
0f05fdd
Compare
ilya-g
approved these changes
Feb 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This almost works. The only issue is that, in the iOS Simulator only, not on actual devices,
NSTimeZone
andkotlinx.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 butNSTimeZone
didn't, breakingTimeZone.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.