diff --git a/quickpeep_raker/src/bin/qp-rake1.rs b/quickpeep_raker/src/bin/qp-rake1.rs index e609408..06bbeef 100644 --- a/quickpeep_raker/src/bin/qp-rake1.rs +++ b/quickpeep_raker/src/bin/qp-rake1.rs @@ -1,5 +1,6 @@ use adblock::lists::RuleTypes; use anyhow::Context; +use chrono::{TimeZone, Utc}; use clap::Parser; use colour::{blue, blue_ln, cyan_ln, green_ln, red_ln, yellow_ln}; use env_logger::Env; @@ -104,6 +105,15 @@ pub async fn main() -> anyhow::Result<()> { if !head.icon.is_empty() { println!("Icon: {}", head.icon); } + match head.datetime { + None => { + println!("Datetime: Unknown"); + } + Some(datetime_unix) => { + let datetime = Utc.timestamp(datetime_unix, 0); + println!("Datetime: {}", datetime.format("%Y-%m-%d %H:%M:%S")); + } + } println!(); print_references(&page.referrer_entry.references);