Struct chrono::offset::fixed::FixedOffset [] [src]

pub struct FixedOffset {
    // some fields omitted
}

The time zone with fixed offset, from UTC-23:59:59 to UTC+23:59:59.

Methods

impl FixedOffset

fn east(secs: i32) -> FixedOffset

Makes a new FixedOffset for the Eastern Hemisphere with given timezone difference. The negative secs means the Western Hemisphere.

Panics on the out-of-bound secs.

fn east_opt(secs: i32) -> Option<FixedOffset>

Makes a new FixedOffset for the Eastern Hemisphere with given timezone difference. The negative secs means the Western Hemisphere.

Returns None on the out-of-bound secs.

fn west(secs: i32) -> FixedOffset

Makes a new FixedOffset for the Western Hemisphere with given timezone difference. The negative secs means the Eastern Hemisphere.

Panics on the out-of-bound secs.

fn west_opt(secs: i32) -> Option<FixedOffset>

Makes a new FixedOffset for the Western Hemisphere with given timezone difference. The negative secs means the Eastern Hemisphere.

Returns None on the out-of-bound secs.

Trait Implementations

impl TimeZone for FixedOffset

type Offset = FixedOffset

fn from_offset(offset: &FixedOffset) -> FixedOffset

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 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>>

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

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

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

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

impl Offset for FixedOffset

fn local_minus_utc(&self) -> Duration

impl Debug for FixedOffset

fn fmt(&self, f: &mut Formatter) -> Result

impl Display for FixedOffset

fn fmt(&self, f: &mut Formatter) -> Result

Derived Implementations

impl Eq for FixedOffset

impl PartialEq for FixedOffset

fn eq(&self, __arg_0: &FixedOffset) -> bool

fn ne(&self, __arg_0: &FixedOffset) -> bool

impl Clone for FixedOffset

fn clone(&self) -> FixedOffset

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

impl Copy for FixedOffset