You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use jiff::Zoned;fnmain() -> anyhow::Result<()>{let zdt:Zoned =
"1969-12-31T23:15:30-00:44:30[Africa/Monrovia]".parse()?;dbg!(&zdt);let zdt:Zoned = "1969-12-31T23:15:30-00:45[Africa/Monrovia]".parse()?;dbg!(&zdt);Ok(())}
Has this output:
$ cargo -q r
[main.rs:6:5] &zdt = 1969-12-31T23:15:30-00:45[Africa/Monrovia]
Error: parsing "1969-12-31T23:15:30-00:45[Africa/Monrovia]" failed: datetime 1969-12-31T23:15:30 could not resolve to a timestamp since 'reject' conflict resolution was chosen, and because datetime has offset -00:45, but the time zone Africa/Monrovia for the given datetime unambiguously has offset -00:44:30
But it shouldn't error. The reason is that -00:45 as parsed in the second example doesn't match the actual internal offset of -00:44:30.
This new routine is like `resolve`, but permits callers to control
how and when two offsets are considered equal. This is then in turn
used by our Temporal datetime parser to permit parsing of offsets
that have been rounded to the nearest minute without rejecting them
for being unequal.
Fixes#231
This new routine is like `resolve`, but permits callers to control
how and when two offsets are considered equal. This is then in turn
used by our Temporal datetime parser to permit parsing of offsets
that have been rounded to the nearest minute without rejecting them
for being unequal.
Fixes#231
This new routine is like `resolve`, but permits callers to control
how and when two offsets are considered equal. This is then in turn
used by our Temporal datetime parser to permit parsing of offsets
that have been rounded to the nearest minute without rejecting them
for being unequal.
Fixes#231
This Jiff program:
Has this output:
But it shouldn't error. The reason is that
-00:45
as parsed in the second example doesn't match the actual internal offset of-00:44:30
.I realized Jiff had a bug here because of this Temporal issue: tc39/proposal-temporal#3079
The text was updated successfully, but these errors were encountered: