From 50e76b9769ee2ab17a4aa84ea3fd8fe725f0a272 Mon Sep 17 00:00:00 2001 From: FliegendeWurst <2012gdwu+github@posteo.de> Date: Mon, 2 Dec 2024 21:37:36 +0100 Subject: [PATCH] Tweak github API fetcher --- src/github.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/github.rs b/src/github.rs index 06d34fd..d0d6a1b 100644 --- a/src/github.rs +++ b/src/github.rs @@ -210,10 +210,10 @@ pub fn get_new_notifications( let items: Vec = serde_json::from_str(&json)?; let new_last_modified = items.get(0).map(|x| x.updated_at.clone()); let last_modified = if let Some(lm) = new_last_modified { - // parse and increase by five seconds + // parse and increase by X seconds let format = format_description!("[year]-[month]-[day]T[hour]:[minute]:[second]Z"); let mut dt = PrimitiveDateTime::parse(&lm, format)?; - dt += time::Duration::seconds(5); + dt += time::Duration::seconds(30); // wtf github Some(dt.format(&format)?) } else { last_modified.map(|x| x.to_owned())