Skip to content

Implement the report's timestamp verification #11

@osuketh

Description

@osuketh

fn verify_timestamp(&self, attn_report: &Value) -> Result<()> {
if let Value::String(time) = &attn_report["timestamp"] {
Ok(())
// TODO
// let time_fixed = time.clone() + "+0000";
// let ts = DateTime::parse_from_str(&time_fixed, "%Y-%m-%dT%H:%M:%S%.f%z").unwrap().timestamp();
// let now = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() as i64;
// ensure!(now - ts > 0, "")

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions