uefi: Add integration with crates jiff and time for struct Time#1911
Closed
phip1611 wants to merge 6 commits into
Closed
uefi: Add integration with crates jiff and time for struct Time#1911phip1611 wants to merge 6 commits into
jiff and time for struct Time#1911phip1611 wants to merge 6 commits into
Conversation
11 tasks
d5d571f to
b55aa67
Compare
Member
Author
|
@nicholasbishop thanks for your valuable review and feedback in #1896 and #1899. I think we are now the closest to have something useful and mergable. Looking forward to your feedback! |
f9b11f2 to
0534af3
Compare
Member
nicholasbishop
left a comment
There was a problem hiding this comment.
Generally looks good to me, but I haven't reviewed in detail yet. Let's break it apart some. I think start with a new PR to move the Time stuff to a new module like uefi::runtime::time, then a PR to add time, then jiff.
0534af3 to
3490870
Compare
This module provides the foundational plumbing for future time-related crate integrations. It introduces common error types, including a unified opaque ConversionError to standardize conversion failures across crates. While integration with crates like time and jiff is planned in subsequent commits, this module lays the groundwork, ensuring a consistent and minimal API for handling errors once those integrations are implemented.
3490870 to
d065d8d
Compare
This was referenced Jun 1, 2026
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.
This is my third design, superseding the outdated approaches #1896 and #1899.
Motivation
My high-level goal is to make
struct Timemore useable, e.g., compare dates (before, after, ...).Design
This PR integrates
struct Timeof theueficrate with https://crates.io/crates/time and https://crates.io/crates/jiff. I decided for the following design:TryFromand no specific constructorsError
There is a single opaque
ConversionErrorshared by allTryFromimpls.Implementation
timecratestruct Time <--> PrimitiveDateTime(without timezone)struct Time <--> OffsetDateTime(with timezone)jiffcratestruct Time <--> DateTime(without timezone)struct Time <--> Zoned(with timezone)