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

pub struct Local;

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

Methods

impl Local

fn today() -> Date<Local>

Returns a Date which corresponds to the current date.

fn now() -> DateTime<Local>

Returns a DateTime which corresponds to the current date.

Trait Implementations

impl TimeZone for Local

type Offset = FixedOffset

fn from_offset(_offset: &FixedOffset) -> Local

fn offset_from_local_date(&self, local: &NaiveDate) -> LocalResult<FixedOffset>

fn offset_from_local_datetime(&self, local: &NaiveDateTime) -> LocalResult<FixedOffset>

fn offset_from_utc_date(&self, utc: &NaiveDate) -> FixedOffset

fn offset_from_utc_datetime(&self, utc: &NaiveDateTime) -> FixedOffset

fn from_local_date(&self, local: &NaiveDate) -> LocalResult<Date<Local>>

fn from_local_datetime(&self, local: &NaiveDateTime) -> LocalResult<DateTime<Local>>

fn from_utc_date(&self, utc: &NaiveDate) -> Date<Local>

fn from_utc_datetime(&self, utc: &NaiveDateTime) -> DateTime<Local>

fn ymd(&self, year: i32, month: u32, day: u32) -> Date<Self>

fn ymd_opt(&self, year: i32, month: u32, day: u32) -> LocalResult<Date<Self>>

fn yo(&self, year: i32, ordinal: u32) -> Date<Self>

fn yo_opt(&self, year: i32, ordinal: u32) -> LocalResult<Date<Self>>

fn isoywd(&self, year: i32, week: u32, weekday: Weekday) -> Date<Self>

fn isoywd_opt(&self, year: i32, week: u32, weekday: Weekday) -> LocalResult<Date<Self>>

fn timestamp(&self, secs: i64, nsecs: u32) -> DateTime<Self>

fn timestamp_opt(&self, secs: i64, nsecs: u32) -> LocalResult<DateTime<Self>>

fn datetime_from_str(&self, s: &str, fmt: &str) -> ParseResult<DateTime<Self>>

Derived Implementations

impl Clone for Local

fn clone(&self) -> Local

fn clone_from(&mut self, source: &Self)

impl Copy for Local