TD5C7JSE4WCYXSLG7GW6GQU2M6O5GALQAVOPNT7A4WUHXRHPUQYAC
ZNNEYXCD2DFYUQTIP5NC3YEYVVBBKG32OUWDKM7REM7BL5OPFTDAC
RAVOIZIUDSG2A44PKQP3KY7IVBWBYSQY4I744B6I7QZFRL3AE4EQC
F2QYIRKBFYFWSTB7Z5CNGSZVYI6XQO3MHPUHJLBHPGLIOG7UNVNQC
PPVF6CAUFB6GIKSYLQ2IYIOPSRRNNBQUG5CLXJDMO6PRD23M4F3AC
#[error("can not convert chrono milliseconds: {0}")] ConvertDuration(std::num::TryFromIntError),
#[error("can not convert chrono milliseconds: {0}")]
ConvertDuration(std::num::TryFromIntError),
row.push(format_duration(entry.time_start, entry.time_finished))
row.push(format_duration(entry.time_start, entry.time_finished)?)
fn format_duration(time_start: DateTime<Utc>, time_finished: DateTime<Utc>) -> String {
fn format_duration( time_start: DateTime<Utc>, time_finished: DateTime<Utc>,) -> Result<String, Error> {
fn format_duration(
time_start: DateTime<Utc>,
time_finished: DateTime<Utc>,
) -> Result<String, Error> {
let duration_std = std::time::Duration::from_millis(duration_ms.try_into().unwrap());
let duration_std = std::time::Duration::from_millis(duration_ms.try_into().map_err(Error::ConvertDuration)?);
let duration_std =
std::time::Duration::from_millis(duration_ms.try_into().map_err(Error::ConvertDuration)?);
humantime::format_duration(duration_std)
Ok(humantime::format_duration(duration_std)
.replace(" ", "")
.replace(" ", ""))