Vendor dependencies

This commit is contained in:
2026-08-01 16:11:49 +03:00
parent 7f139a0241
commit 6b5e7f0f8b
29706 changed files with 9575646 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
use std::str::FromStr as _;
use chrono::Utc;
use chrono_tz::Tz;
use croner::Cron;
fn main() {
// Parse cron expression
let cron = Cron::from_str("18 * * * 5").expect("Couldn't parse cron string");
// Find the next occurrence in Europe/Stockholm
let now_stockholm = Utc::now().with_timezone(&Tz::Europe__Stockholm);
let next_stockholm = cron.find_next_occurrence(&now_stockholm, false).unwrap();
// Output results for Europe/Stockholm
println!("UTC time is: {}", &Utc::now());
println!("Time in Europe/Stockholm time is: {}", &now_stockholm);
println!(
"Pattern \"{}\" will match next time at (Europe/Stockholm): {}",
cron.pattern, next_stockholm
);
}