Struct chrono::offset::utc::UTC [-] [+] [src]

pub struct UTC;

The UTC time zone. This is the most efficient time zone when you don't need the local time. It is also used as an offset (which is also a dummy type).

Methods

impl UTC

fn today() -> Date<UTC>

Returns a Date which corresponds to the current date.

fn now() -> DateTime<UTC>

Returns a DateTime which corresponds to the current date.

Trait Implementations

impl TimeZone for UTC

type Offset = UTC

fn from_offset(_state: &UTC) -> UTC

fn offset_from_local_date(&self, _local: &NaiveDate) -> LocalResult<UTC>

fn offset_from_local_datetime(&self, _local: &NaiveDateTime) -> LocalResult<UTC>

fn offset_from_utc_date(&self, _utc: &NaiveDate) -> UTC

fn offset_from_utc_datetime(&self, _utc: &NaiveDateTime) -> UTC

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 UTC

fn local_minus_utc(&self) -> Duration

impl Debug for UTC

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

impl Display for UTC

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

Derived Implementations

impl Eq for UTC

fn assert_receiver_is_total_eq(&self)

impl PartialEq for UTC

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

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

impl Clone for UTC

fn clone(&self) -> UTC

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

impl Copy for UTC