Struct chrono::offset::Local[][src]

pub struct Local;

The local timescale. This is implemented via the standard time crate.

Using the TimeZone methods on the Local struct is the preferred way to construct DateTime<Local> instances.

Example

use chrono::{Local, DateTime, TimeZone};

let dt: DateTime<Local> = Local::now();
let dt: DateTime<Local> = Local.timestamp(0, 0);

Implementations

impl Local[src]

pub fn today() -> Date<Local>[src]

Returns a Date which corresponds to the current date.

pub fn now() -> DateTime<Local>[src]

Returns a DateTime which corresponds to the current date.

Trait Implementations

impl Clone for Local[src]

impl Copy for Local[src]

impl Debug for Local[src]

impl TimeZone for Local[src]

type Offset = FixedOffset

An associated offset type. This type is used to store the actual offset in date and time types. The original TimeZone value can be recovered via TimeZone::from_offset. Read more

Auto Trait Implementations

impl RefUnwindSafe for Local

impl Send for Local

impl Sync for Local

impl Unpin for Local

impl UnwindSafe for Local

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.