aboutsummaryrefslogtreecommitdiff
path: root/src/utils/time.rs
blob: fcfb691ac3ef29cfa66b3f72b60eb29eb537a5e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::config::CONFIG;
use chrono::prelude::*;

pub fn get_time() -> String {
    let now = Local::now();

    format!(
        "  {}  {}  {}",
        CONFIG.time.icon,
        now.format(&CONFIG.time.format),
        CONFIG.seperator
    )
}