pub fn system_time_from_date(date: &str) -> Result<SystemTime> {
    Ok(UNIX_EPOCH
    + Duration::from_secs(
        dateutil::HgTime::parse(&date)
            .ok_or_else(|| {
                anyhow!(
                    "Unrecognized timestamp format\n\
                Input: {}.\n\
                Examples:\n\t\
                Keywords: now, today, yesterday\n\t\
                Relative: \"{{humantime}} ago\", e.g. 2 days 3 hr 15m 10sec ago\n\t\
                Relative short: Mixed {{time_digit}}{{time_unit_char}}. E.g. 10m, 3d2H, 5h30s, 10m5h\n\t\
                Absolute: \"Jan 01 23:59\", \"01/01/1970 11:59PM\", \"1970-01-01 23:59:59\"\n\t\
                Unix Epoch: 1589808367",
                    &date
                )
            })?
            .unixtime,
    ))
}
/// Convert from date to `SystemTime`
Convert from date to `SystemTime`
Convert from date to ` SystemTime `
pub fn system_time_from_date(date: &str) -> Result<SystemTime> {
    Ok(UNIX_EPOCH
    + Duration::from_secs(
        dateutil::HgTime::parse(&date)
            .ok_or_else(|| {
                anyhow!(
                    "Unrecognized timestamp format\n\
                Input: {}.\n\
                Examples:\n\t\
                Keywords: now, today, yesterday\n\t\
                Relative: \"{{humantime}} ago\", e.g. 2 days 3 hr 15m 10sec ago\n\t\
                Relative short: Mixed {{time_digit}}{{time_unit_char}}. E.g. 10m, 3d2H, 5h30s, 10m5h\n\t\
                Absolute: \"Jan 01 23:59\", \"01/01/1970 11:59PM\", \"1970-01-01 23:59:59\"\n\t\
                Unix Epoch: 1589808367",
                    &date
                )
            })?
            .unixtime,
    ))
}
pub fn system_time_from_date ( date : & str ) -> Result < SystemTime > { Ok ( UNIX_EPOCH + Duration :: from_secs ( dateutil :: HgTime :: parse ( & date ) . ok_or_else ( | | { anyhow ! ( " \n \
 \n \
 \n \t \
 \n \t \
 \" \" \n \t \
 \n \t \
 \" \" \" \" \" \" \n \t \
 " date ) } ) ? . unixtime , ) ) }
Convert from date to `SystemTime`
Convert from date to ` SystemTime `
date
&str
date
&str