atomic_web_push 0.3.0

A library that eliminates potential risks (occasional crashes due to OpenSSL library's setenv conflicts in Linux environments) from the web push library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use chrono::{DateTime, FixedOffset, Local, Utc};

pub fn now() -> DateTime<FixedOffset> {
    let now = Utc::now();
    let offset_in_sec = Local::now().offset().local_minus_utc();
    let offset = FixedOffset::east_opt(offset_in_sec).unwrap();
    now.with_timezone(&offset)
}

#[test]
fn test_now() {
    let now = now();
    println!("{:?}", now);
}