libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit ba1bef8f271453ecf5da960f2ba5ccca54fffa7f
parent c327b3dd9588f4e6e5642843b1194d3cbf6ba31d
Author: Antoine A <>
Date:   Tue, 17 Nov 2026 15:09:41 +0100

common: update jiff to 1.0

Diffstat:
MCargo.lock | 124+++++++++++++++++++++++++++++++------------------------------------------------
MCargo.toml | 3+--
Mlibeufin-bank/Cargo.toml | 1-
Mlibeufin-bank/src/bench.rs | 4++--
Mlibeufin-bank/src/lib.rs | 5++---
Mlibeufin-ebics/src/crypto.rs | 4++--
Mlibeufin-ebics/src/ebics/bts.rs | 6+++---
Mlibeufin-ebics/src/ebics/logger.rs | 4++--
Mlibeufin-ebics/src/iso20022/camt.rs | 2+-
Mlibeufin-ebics/src/iso20022/pain001.rs | 4++--
Mlibeufin-ebics/src/pdf.rs | 4++--
Mlibeufin-ebics/src/test.rs | 4++--
Mlibeufin-ebisync/src/azure.rs | 4++--
Mlibeufin-ebisync/src/lib.rs | 4++--
Mlibeufin-nexus/src/fetch.rs | 4++--
Mlibeufin-nexus/src/manual.rs | 2+-
Mlibeufin-nexus/src/testing.rs | 2+-
Mtestbench/Cargo.toml | 2+-
18 files changed, 76 insertions(+), 107 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock @@ -334,9 +334,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.20.3" +version = "3.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" +checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db" [[package]] name = "byteorder" @@ -378,9 +378,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ff2a8126fff0f8c839080d619675a585e61720bb12d2baceae45769fd66f155" +checksum = "33ef9e3e8154a45c7a95cff4c1299702106ad94062d7bb85fdc5d3a5afd91d45" dependencies = [ "find-msvc-tools", "jobserver", @@ -423,9 +423,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.7" +version = "4.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946" +checksum = "ac230478587d0269d8d6998b82ae69ea51509d55df66d9e92edd1f986904cd4a" dependencies = [ "clap_builder", "clap_derive", @@ -445,9 +445,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.6.7" +version = "4.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0" +checksum = "895c9d8d2ac2dd8b8a29f3724a14e72aaaa6debcf8c38c82f97305c6a172767a" dependencies = [ "heck", "proc-macro2", @@ -457,9 +457,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486" +checksum = "e0921b3876b3a1df8a1c9f912e7f94342458022c2e84288015893d83c4d62a79" [[package]] name = "cmake" @@ -928,9 +928,9 @@ checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" [[package]] name = "errno" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +checksum = "e35d6e78f4cebb90e51d543db8fe41528851d6deeef6ef21ebd4bfdc1e784776" dependencies = [ "libc", "windows-sys 0.61.2", @@ -1022,21 +1022,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" [[package]] -name = "futures" -version = "0.3.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] name = "futures-channel" version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1053,17 +1038,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" [[package]] -name = "futures-executor" -version = "0.3.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] name = "futures-intrusive" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1109,7 +1083,6 @@ version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" dependencies = [ - "futures-channel", "futures-core", "futures-io", "futures-macro", @@ -1305,7 +1278,7 @@ dependencies = [ [[package]] name = "http-client" version = "1.5.0" -source = "git+git://git.taler.net/taler-rust.git/#b7a02a2348b62e53a4e3f9076c2d4887a79c1bbc" +source = "git+git://git.taler.net/taler-rust.git/#406ed50c4432da51771aef938a33e1a47d658b49" dependencies = [ "futures-util", "http", @@ -1565,9 +1538,9 @@ checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4" [[package]] name = "jiff" -version = "0.2.43" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26699905cc795a23e3949585cc7ba3ee8ade090872a27e4316304a777297894a" +checksum = "9cc767b5763de45e810109520123bb2829a653f3a7ed9be40b2bc4f81158f595" dependencies = [ "jiff-core", "jiff-static", @@ -1581,36 +1554,36 @@ dependencies = [ [[package]] name = "jiff-core" -version = "0.1.5" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe6854081f5ac0a3046a9b223729ccd7a20b1e0e8277e44dc0660eedf67dfe2" +checksum = "894f7ac42105f584100691b3bf6e6b92dd12fcfa225f6c397f95c8a94b47b68f" dependencies = [ "log", ] [[package]] name = "jiff-static" -version = "0.2.43" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b4ff49b2887190c760b86207b55cdcaabbdecaf7a0660d68aa2ed6f652abf0a" +checksum = "955491488dc99b572ea6d67b172dcd98787d00744b1fb44a5689b4e6413695a6" dependencies = [ "jiff-core", "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.10", ] [[package]] name = "jiff-tzdb" -version = "0.1.9" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8377070c6bae868759445e5a77f66d84f0b72f3a054bfb00e6d038b8282da7" +checksum = "12e71a1b68a875a44a33bb7a1dd84392cb77145a3367a552a3cfe6a4f5cf3afc" [[package]] name = "jiff-tzdb-platform" -version = "0.1.3" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" +checksum = "dc65b284afcfa8f6cf189c7274c805505314a7ab975c60e1f548bff56525420e" dependencies = [ "jiff-tzdb", ] @@ -1723,11 +1696,10 @@ dependencies = [ "clap", "compact_str", "dialoguer", - "futures", "jiff", "pretty_assertions", "prometheus-client", - "rand 0.10.3", + "rand 0.10.4", "regex", "serde", "serde_json", @@ -1761,7 +1733,7 @@ dependencies = [ "jiff", "pdf-writer", "pretty_assertions", - "rand 0.10.3", + "rand 0.10.4", "rcgen", "reqwest", "reqwest-websocket", @@ -1948,9 +1920,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "mio" -version = "1.2.4" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" +checksum = "20521a903f02b0a573cd6840e9d0a5a0cc043d361fe924092cd70f8556cc9c4a" dependencies = [ "libc", "log", @@ -1983,9 +1955,9 @@ checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" [[package]] name = "nix" -version = "0.31.3" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" +checksum = "77730ed34f01f4990cb2ea67fec715ecebc6fab9a6396cf83c5529b13f581bdc" dependencies = [ "bitflags", "cfg-if", @@ -2287,7 +2259,7 @@ dependencies = [ "bytes", "getrandom 0.4.3", "lru-slab", - "rand 0.10.3", + "rand 0.10.4", "rand_pcg", "ring", "rustc-hash", @@ -2347,9 +2319,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" +checksum = "8f6fa277c67e6ea590466f04c3fe82cb509f0864fe470643e5570de9514a9b11" dependencies = [ "chacha20", "getrandom 0.4.3", @@ -2642,9 +2614,9 @@ checksum = "eec689c0bc40ff2458a5977b6619cb718087084a18e02a131c599b62d05e1a5f" [[package]] name = "rustls-webpki" -version = "0.103.16" +version = "0.103.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281" +checksum = "e3a0760a887c14823fca5a1c970b01d47c328c696c0c64829d1df50e8f853fd5" dependencies = [ "aws-lc-rs", "ring", @@ -3050,7 +3022,7 @@ dependencies = [ "log", "md-5", "memchr", - "rand 0.10.3", + "rand 0.10.4", "serde", "serde_json", "sha2 0.11.1", @@ -3219,7 +3191,7 @@ dependencies = [ [[package]] name = "taler-api" version = "1.5.0" -source = "git+git://git.taler.net/taler-rust.git/#b7a02a2348b62e53a4e3f9076c2d4887a79c1bbc" +source = "git+git://git.taler.net/taler-rust.git/#406ed50c4432da51771aef938a33e1a47d658b49" dependencies = [ "aws-lc-rs", "axum", @@ -3229,7 +3201,7 @@ dependencies = [ "jiff", "listenfd", "prometheus-client", - "rand 0.10.3", + "rand 0.10.4", "regex", "serde", "serde_json", @@ -3250,12 +3222,12 @@ dependencies = [ [[package]] name = "taler-build" version = "1.5.0" -source = "git+git://git.taler.net/taler-rust.git/#b7a02a2348b62e53a4e3f9076c2d4887a79c1bbc" +source = "git+git://git.taler.net/taler-rust.git/#406ed50c4432da51771aef938a33e1a47d658b49" [[package]] name = "taler-common" version = "1.5.0" -source = "git+git://git.taler.net/taler-rust.git/#b7a02a2348b62e53a4e3f9076c2d4887a79c1bbc" +source = "git+git://git.taler.net/taler-rust.git/#406ed50c4432da51771aef938a33e1a47d658b49" dependencies = [ "anyhow", "aws-lc-rs", @@ -3265,7 +3237,7 @@ dependencies = [ "glob", "indexmap", "jiff", - "rand 0.10.3", + "rand 0.10.4", "regex", "serde", "serde_json", @@ -3287,7 +3259,7 @@ dependencies = [ [[package]] name = "taler-macros" version = "1.5.0" -source = "git+git://git.taler.net/taler-rust.git/#b7a02a2348b62e53a4e3f9076c2d4887a79c1bbc" +source = "git+git://git.taler.net/taler-rust.git/#406ed50c4432da51771aef938a33e1a47d658b49" dependencies = [ "proc-macro2", "quote", @@ -3297,7 +3269,7 @@ dependencies = [ [[package]] name = "taler-test-utils" version = "1.5.0" -source = "git+git://git.taler.net/taler-rust.git/#b7a02a2348b62e53a4e3f9076c2d4887a79c1bbc" +source = "git+git://git.taler.net/taler-rust.git/#406ed50c4432da51771aef938a33e1a47d658b49" dependencies = [ "aws-lc-rs", "axum", @@ -3800,13 +3772,13 @@ checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6" [[package]] name = "uuid" -version = "1.29.2" +version = "1.29.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bed99139f7dac9b5cfe5f17be4d66dc7079a34dee1d74bcc77217119240e267c" +checksum = "3c14b15dffa2f4bd712103e857140aa04a4f2ff6e955c77d7eb8e53ee02a3b64" dependencies = [ "getrandom 0.4.3", "js-sys", - "rand 0.10.3", + "rand 0.10.4", "serde_core", "wasm-bindgen", ] @@ -4293,9 +4265,9 @@ dependencies = [ [[package]] name = "zip" -version = "9.5.1" +version = "9.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3476fd497ac8af5b1ec7b51acab7bef380f7e8dd8e0487595bafd839417a302" +checksum = "953a376f4930ed5af88e1e65948385f76866b45e7f75b21ac275327d0eeb9b46" dependencies = [ "constant_time_eq", "crc32fast", diff --git a/Cargo.toml b/Cargo.toml @@ -9,7 +9,6 @@ rust-version = "1.95" authors = ["Taler Systems SA <deb@taler.net>"] homepage = "https://taler.net/" repository = "https://git.taler.net/libeufin.git" -license-file = "COPYING" [profile.dev] debug = true @@ -36,7 +35,7 @@ aws-lc-rs = "1.15" compact_str = { version = "0.10.0", features = ["serde", "sqlx-postgres"] } reqwest = "0.13.2" libeufin-ebics = { path = "libeufin-ebics" } -jiff = { version = "0.2", features = ["serde"] } +jiff = { version = "1", features = ["serde"] } clap = { version = "4.5", features = ["derive"] } uuid = { version = "1.0", features = ["v4", "fast-rng", "serde"] } rand = "0.10" diff --git a/libeufin-bank/Cargo.toml b/libeufin-bank/Cargo.toml @@ -39,6 +39,5 @@ tower-http.workspace = true url.workspace = true pretty_assertions.workspace = true prometheus-client.workspace = true -futures = "0.3" regex = "1.12" bcrypt = "0.19.0" diff --git a/libeufin-bank/src/bench.rs b/libeufin-bank/src/bench.rs @@ -22,7 +22,7 @@ use std::fmt::Write as _; use aws_lc_rs::signature::{Ed25519KeyPair, KeyPair as _}; use axum::http::header::AUTHORIZATION; use compact_str::{CompactString, format_compact}; -use jiff::{Timestamp, Zoned, tz::TimeZone}; +use jiff::{Timestamp, ZonedDateTime, tz::TimeZone}; use sqlx::postgres::PgConnectOptions; use taler_common::{ api::{ @@ -196,7 +196,7 @@ pub async fn bench_db(db: PgConnectOptions) { writeln!( f, "day\t{}", - Zoned::new(Timestamp::from_second(i as i64).unwrap(), TimeZone::UTC).datetime() + ZonedDateTime::new(Timestamp::from_second(i as i64).unwrap(), TimeZone::UTC).datetime() ) }) .await; diff --git a/libeufin-bank/src/lib.rs b/libeufin-bank/src/lib.rs @@ -25,7 +25,7 @@ use std::{ use anyhow::{anyhow, bail}; use compact_str::CompactString; use dialoguer::Password; -use jiff::{Timestamp, Zoned}; +use jiff::{Timestamp, ZonedDateTime}; use rand::{RngExt as _, distr::Alphanumeric}; use serde::{Deserialize, Serialize}; use taler_api::api::TalerRouter; @@ -169,7 +169,6 @@ pub enum Cmd { debit_threshold: Option<Amount>, /// Enables 2FA and set the TAN channel used for challenges - #[arg(long)] #[arg(long, alias("tan_channel"))] tan_channel: Vec<TanChannel>, }, @@ -479,7 +478,7 @@ pub async fn run(cfg: &Config, cmd: Cmd) -> anyhow::Result<()> { Cmd::Gc => { let cfg = BankCfg::parse(cfg)?; let db = pool(&cfg.db_cfg).await?; - let now = Zoned::now(); + let now = ZonedDateTime::now(); collect( &db, &(now.clone() - cfg.gc_abort_after).timestamp(), diff --git a/libeufin-ebics/src/crypto.rs b/libeufin-ebics/src/crypto.rs @@ -32,7 +32,7 @@ use aws_lc_rs::{ }, signature::{RSA_PSS_2048_8192_SHA256, RSA_PSS_SHA256, UnparsedPublicKey}, }; -use jiff::{Timestamp, Zoned, tz::TimeZone}; +use jiff::{Timestamp, ZonedDateTime, tz::TimeZone}; use rand::{TryRng, rngs::SysRng}; use rcgen::{BasicConstraints, CertificateParams, DnType, IsCa, KeyUsagePurpose}; use taler_common::encoding::{base64, hex}; @@ -49,7 +49,7 @@ pub fn x509_certificate_from_rsa_private( // Set subject/issuer CN params.distinguished_name.push(DnType::CommonName, name); - let now = Zoned::new(Timestamp::now(), TimeZone::UTC).date(); + let now = ZonedDateTime::new(Timestamp::now(), TimeZone::UTC).date(); // 1000-year validity params.not_before = rcgen::date_time_ymd(now.year() as i32, now.month() as u8, now.day() as u8); diff --git a/libeufin-ebics/src/ebics/bts.rs b/libeufin-ebics/src/ebics/bts.rs @@ -20,7 +20,7 @@ /*! EBICS protocol for business transactions */ use compact_str::CompactString; -use jiff::{Timestamp, Zoned, tz::TimeZone}; +use jiff::{Timestamp, ZonedDateTime, tz::TimeZone}; use roxmltree::Document; use taler_common::encoding::base64; @@ -126,8 +126,8 @@ pub fn d_init( if let Some((start, end)) = range { xml!(w => "DateRange" { - "Start": Zoned::new(*start, TimeZone::UTC).date(), - "End": Zoned::new(*end, TimeZone::UTC).date() + "Start": ZonedDateTime::new(*start, TimeZone::UTC).date(), + "End": ZonedDateTime::new(*end, TimeZone::UTC).date() } ) } diff --git a/libeufin-ebics/src/ebics/logger.rs b/libeufin-ebics/src/ebics/logger.rs @@ -23,7 +23,7 @@ use std::{ path::{Path, PathBuf}, }; -use jiff::{Zoned, tz::TimeZone}; +use jiff::{ZonedDateTime, tz::TimeZone}; use reqwest::Response; use tracing::info; @@ -45,7 +45,7 @@ impl EbicsLogger { } fn log_dir(root: &Path, ctx: &EbicsCtx) -> Result<PathBuf, EbicsError> { - let now_utc = Zoned::new(ctx.now, TimeZone::UTC).datetime(); + let now_utc = ZonedDateTime::new(ctx.now, TimeZone::UTC).datetime(); // yyyy-MM-dd per day directory & HH:mm:ss.SSS-name per transaction directory let path = root.join(format!( "{}/{}-{}", diff --git a/libeufin-ebics/src/iso20022/camt.rs b/libeufin-ebics/src/iso20022/camt.rs @@ -132,7 +132,7 @@ fn execution_date(n: Xml) -> xml::Result<Timestamp> { } else { date.one("DtTm").parse::<civil::DateTime>()? }; - Ok(date.to_zoned(TimeZone::UTC).unwrap().timestamp()) + Ok(date.to_zoned_datetime(TimeZone::UTC).unwrap().timestamp()) } /** Parse a payto */ diff --git a/libeufin-ebics/src/iso20022/pain001.rs b/libeufin-ebics/src/iso20022/pain001.rs @@ -17,7 +17,7 @@ * <http://www.gnu.org/licenses/> */ -use jiff::{Timestamp, Zoned, tz::TimeZone}; +use jiff::{Timestamp, ZonedDateTime, tz::TimeZone}; use taler_common::types::{ amount::{Amount, Decimal}, payto::FullIbanPayto, @@ -112,7 +112,7 @@ pub fn create_pain001( }) }, "ReqdExctnDt" { - "Dt": Zoned::new(*msg.timestamp, TimeZone::UTC).date().to_string() + "Z" + "Dt": ZonedDateTime::new(*msg.timestamp, TimeZone::UTC).date().to_string() + "Z" }, "Dbtr" { "Nm": msg.debtor.name diff --git a/libeufin-ebics/src/pdf.rs b/libeufin-ebics/src/pdf.rs @@ -18,14 +18,14 @@ */ use aws_lc_rs::{encoding::AsDer as _, rsa::PublicKey, signature::KeyPair}; -use jiff::Zoned; +use jiff::ZonedDateTime; use pdf_writer::{Content, Finish, Name, Pdf, Rect, Ref, Str}; use crate::{ config::EbicsHostCfg, crypto::ebics_pub_key_hash, keys::ClientKeys, utils::hex_chunk_by_two, }; pub fn generate_keys_pdf(keys: &ClientKeys, cfg: &EbicsHostCfg) -> anyhow::Result<Vec<u8>> { - let date = Zoned::now().date().to_string(); + let date = ZonedDateTime::now().date().to_string(); // Assign structural IDs directly let catalog_id = Ref::new(1); diff --git a/libeufin-ebics/src/test.rs b/libeufin-ebics/src/test.rs @@ -28,7 +28,7 @@ use aws_lc_rs::rsa::{KeyPair, KeySize, PublicKey}; use axum::{body::Bytes, response::IntoResponse as _, routing::post}; use compact_str::CompactString; use jiff::{ - Timestamp, Zoned, + Timestamp, ZonedDateTime, civil::{Date, date}, tz::TimeZone, }; @@ -424,7 +424,7 @@ impl EbicsState { pub fn btd_no_data_now(&mut self, body: &[u8]) -> EbicsRes { self.btd_date_check( body, - Some(Zoned::new(Timestamp::now(), TimeZone::UTC).date()), + Some(ZonedDateTime::new(Timestamp::now(), TimeZone::UTC).date()), ) } diff --git a/libeufin-ebisync/src/azure.rs b/libeufin-ebisync/src/azure.rs @@ -26,7 +26,7 @@ use axum::{ }; use compact_str::{CompactString, ToCompactString}; use http_client::{ApiErr, Client, ClientErr, builder::Req}; -use jiff::{Timestamp, Zoned, tz::TimeZone}; +use jiff::{Timestamp, ZonedDateTime, tz::TimeZone}; use reqwest::{ Method, StatusCode, Url, header::{ @@ -79,7 +79,7 @@ impl<'a> AzureBlobStorage<'a> { async fn req(&self, req: Req) -> AzureResult { // Set required headers (x-ms-date and x-ms-version) // Azure uses x-ms-date instead of the standard Date header for signing - let date = Zoned::new(Timestamp::now(), TimeZone::UTC) + let date = ZonedDateTime::new(Timestamp::now(), TimeZone::UTC) .strftime("%a, %d %b %Y %H:%M:%S GMT") .to_string(); let req = req diff --git a/libeufin-ebisync/src/lib.rs b/libeufin-ebisync/src/lib.rs @@ -29,7 +29,7 @@ use anyhow::{anyhow, bail}; use axum::{body::Bytes, http::HeaderValue}; use compact_str::CompactStringExt; use http_client::Client; -use jiff::{SignedDuration, Timestamp, Zoned, civil::Date, tz::TimeZone}; +use jiff::{SignedDuration, Timestamp, ZonedDateTime, civil::Date, tz::TimeZone}; use libeufin_ebics::{ cli::{EbicsArgs, EbicsLogs}, db::{get_task_status, update_task_status}, @@ -337,7 +337,7 @@ pub async fn ebics_fetch( let next_checkpoint = { if let Some(last_trial) = checkpoint.last_trial { // We run today at checkpoint_time - let checkpoint_date = Zoned::new(now, TimeZone::UTC) + let checkpoint_date = ZonedDateTime::new(now, TimeZone::UTC) .with() .time(fetch_cfg.checkpoint_time) .build() diff --git a/libeufin-nexus/src/fetch.rs b/libeufin-nexus/src/fetch.rs @@ -24,7 +24,7 @@ use std::{ use anyhow::{anyhow, bail}; use compact_str::CompactStringExt; -use jiff::{SignedDuration, Timestamp, Zoned, tz::TimeZone}; +use jiff::{SignedDuration, Timestamp, ZonedDateTime, tz::TimeZone}; use libeufin_ebics::{ db::{get_task_status, update_task_status}, ebics::{ @@ -181,7 +181,7 @@ pub async fn ebics_fetch( let next_checkpoint = { if let Some(last_trial) = checkpoint.last_trial { // We run today at checkpoint_time - let checkpoint_date = Zoned::new(now, TimeZone::UTC) + let checkpoint_date = ZonedDateTime::new(now, TimeZone::UTC) .with() .time(fetch_cfg.checkpoint_time) .build() diff --git a/libeufin-nexus/src/manual.rs b/libeufin-nexus/src/manual.rs @@ -90,7 +90,7 @@ impl ManualCmd { let mut metadata = String::new(); write!(&mut metadata, "Exported {} pain.001 files:", batches.len()).unwrap(); for batch in batches { - let datetime = batch.creation_date.to_zoned(TimeZone::UTC).datetime(); + let datetime = batch.creation_date.to_zoned_datetime(TimeZone::UTC).datetime(); zip.start_file( format!("{datetime}-{}.xml", batch.msg_id), FileOptions::DEFAULT, diff --git a/libeufin-nexus/src/testing.rs b/libeufin-nexus/src/testing.rs @@ -270,7 +270,7 @@ impl TestingCmd { &order, &pinned_start.map(|date| { ( - date.to_zoned(TimeZone::UTC).unwrap().timestamp(), + date.to_zoned_datetime(TimeZone::UTC).unwrap().timestamp(), Timestamp::now(), ) }), diff --git a/testbench/Cargo.toml b/testbench/Cargo.toml @@ -36,4 +36,4 @@ walkdir = "2.5" [dev-dependencies] serde_json.workspace = true -nix = { version = "0.31", features = ["user"] } +nix = { version = "0.32", features = ["user"] }