Skip to content
Discussion options

You must be logged in to vote

These are correct. The leading 00 for the negative year is part of ISO 8601 IIRC. It's definitely at least specified by the Temporal ISO 8601 extension.

As for the specific values, they are correct. To understand why, we have to look at the minimum and maximum values for the following three things in concert:

  • jiff::tz::Offset
  • jiff::Timestamp
  • jiff::civil::DateTime

Specifically, the docs for jiff::civil::DateTime::MAX say (emphasis mine):

The maximum is chosen such that any Timestamp combined with any valid time zone offset can be infallibly converted to this type.

So what is the maximum possible offset? It is documented to be 25:59:59 (that is, 25 hours, 59 minutes, 59 seconds).

So in …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@zacknewman
Comment options

@BurntSushi
Comment options

@BurntSushi
Comment options

Answer selected by BurntSushi
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #301 on March 23, 2025 02:46.