Struct hot_ranking_algorithm::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]
fn today() -> Date<Utc>
[src]
Returns a Date
which corresponds to the current date.
fn now() -> DateTime<Utc>
[src]
Returns a DateTime
which corresponds to the current date.