deschuler 0.4.1

An async, tokio based scheduling library for rust with a built-in cron builder.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use chrono::{Local, NaiveDateTime, Utc};

pub(crate) fn get_now_naive(use_utc: bool) -> NaiveDateTime {
    match use_utc {
        true => now_utc(),
        false => now_local(),
    }
}

pub(crate) fn now_local() -> NaiveDateTime {
    Local::now().naive_local()
}

pub(crate) fn now_utc() -> NaiveDateTime {
    Utc::now().naive_utc()
}