commit ca7b6649e1003711ba0f7d28c3b40c55852fa63d
parent 512a4592c5e721191356835fecd0317bb5a543d6
Author: Antoine A <>
Date: Fri, 4 Sep 2026 12:50:40 +0200
common: drop try_get_taler_timestamp in favor of the native type
Diffstat:
1 file changed, 0 insertions(+), 14 deletions(-)
diff --git a/common/taler-api/src/db.rs b/common/taler-api/src/db.rs
@@ -33,7 +33,6 @@ use taler_common::{
amount::{Amount, Currency, Decimal},
iban::IBAN,
payto::PaytoURI,
- time::TalerTimestamp,
utils::date_to_utc_ts,
},
};
@@ -284,19 +283,6 @@ pub trait TypeHelper {
}
})
}
- fn try_get_taler_timestamp<I: sqlx::ColumnIndex<Self>>(
- &self,
- index: I,
- ) -> sqlx::Result<TalerTimestamp> {
- self.try_get_map(index, |micros: Option<i64>| match micros {
- Some(micros) => Ok::<_, String>(TalerTimestamp::Timestamp(
- jiff::Timestamp::from_microsecond(micros).map_err(|e| {
- format!("expected timestamp micros got overflowing {micros}: {e}")
- })?,
- )),
- None => Ok(TalerTimestamp::Never),
- })
- }
fn try_get_date<I: sqlx::ColumnIndex<Self>>(&self, index: I) -> sqlx::Result<Date> {
let timestamp = self.try_get_timestamp(index)?;
let zoned = timestamp.to_zoned(TimeZone::UTC);