diff --git a/juniper/Cargo.toml b/juniper/Cargo.toml index 3539713f0..574e98b23 100644 --- a/juniper/Cargo.toml +++ b/juniper/Cargo.toml @@ -53,7 +53,7 @@ fnv = "1.0.5" futures = { version = "0.3.22", features = ["alloc"], default-features = false } graphql-parser = { version = "0.4", optional = true } indexmap = { version = "2.0", features = ["serde"] } -jiff = { version = "0.1.4", optional = true } +jiff = { version = "0.1.5", optional = true } juniper_codegen = { version = "0.16.0", path = "../juniper_codegen" } rust_decimal = { version = "1.20", default-features = false, optional = true } ryu = { version = "1.0", optional = true } diff --git a/juniper/src/integrations/jiff.rs b/juniper/src/integrations/jiff.rs index f159e9ce5..b19d3a5c4 100644 --- a/juniper/src/integrations/jiff.rs +++ b/juniper/src/integrations/jiff.rs @@ -126,10 +126,7 @@ mod local_time { if v.subsec_nanosecond() == 0 { v.strftime(FORMAT_NO_MILLIS) } else { - // `LocalTime` scalar only allows precision up to milliseconds. - (*v).round(jiff::Unit::Millisecond) - .unwrap_or_else(|e| panic!("failed to format `LocalTime`: {e}")) - .strftime(FORMAT) + v.strftime(FORMAT) } .to_string(), )