Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1679 +/- ##
==========================================
+ Coverage 90.61% 90.68% +0.07%
==========================================
Files 38 39 +1
Lines 16055 16180 +125
==========================================
+ Hits 14548 14673 +125
Misses 1507 1507 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
This should come with CI coverage for Android and OpenHarmony. The new parser should be cleaned up, have a look at the rustls style guide (which I wrote) and try to simplify (drop the OS constructor, make the constant names more concise, avoid nested types/functions). |
Contributor
Author
|
@djc Hi, all new lines are covered now, and parser was cleaned up. Please take a look. |
djc
reviewed
Apr 9, 2025
Contributor
Author
|
ping @djc plz take a look |
djc
approved these changes
Jul 8, 2025
Contributor
Author
|
@djc done |
This file contains hidden or 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
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.
OpenHarmony's
tzdataparsing supported was introduced in #1613.OpenHarmony's
tzdatashares the same characters with the ones on Android, except that each timezone index is 4 byte's smaller(the legacyrawUtcOffsetwas removed).OpenHarmony's tzdata
Android's tzdata
As their parsing logic are pretty similar, I unified their logic into
src/offset/local/tzdata.rs(I actually created a crate for that, but the logic is simple enough to put into chrono). This also allows us to remove theandroid_tzdatadependency.BTW, OpenHarmony's tzdata parsing logic was also added in
fallback_timezone, that's because OpenHarmony doesn't have/etc/localtime, people need to use it's time service api to get the timezone name. I created a PR for iana-time-zone to support OpenHarmony's timezone name fetching: strawlab/iana-time-zone#150. After getting the timezone name fromiana_time_zone::get_timezone, chrono need to find it's timezone information in thetzdata.