Skip to main content

FixTime

Trait FixTime 

Source
pub trait FixTime {
    // Provided methods
    fn now_utc8() -> DateTime<FixedOffset> { ... }
    fn to_utc8<Tz: TimeZone>(dt: DateTime<Tz>) -> DateTime<FixedOffset> { ... }
}

Provided Methods§

Source

fn now_utc8() -> DateTime<FixedOffset>

获取当前的 UTC+8 时间

Source

fn to_utc8<Tz: TimeZone>(dt: DateTime<Tz>) -> DateTime<FixedOffset>

将给定的 DateTime 转换为 UTC+8 时区

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§