Struct systemstat::data::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).

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

Example

use chrono::{DateTime, TimeZone, NaiveDateTime, UTC};

let dt = DateTime::<UTC>::from_utc(NaiveDateTime::from_timestamp(61, 0), UTC);

assert_eq!(UTC.timestamp(61, 0), dt);
assert_eq!(UTC.ymd(1970, 1, 1).and_hms(0, 1, 1), dt);

Methods

impl UTC
[src]

Returns a Date which corresponds to the current date.

Returns a DateTime which corresponds to the current date.

Trait Implementations

impl Display for UTC
[src]

impl Copy for UTC
[src]

impl Eq for UTC
[src]

impl Offset for UTC
[src]

impl PartialEq<UTC> for UTC
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl TimeZone for UTC
[src]

impl Debug for UTC
[src]

Formats the value using the given formatter.

impl Clone for UTC
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more