Struct Timespec

pub struct Timespec {
    sec: i64,
    nsec: i32,
}

A record specifying a time value in seconds and nanoseconds.

Struct Tm

pub struct Tm {
    tm_sec: i32,
    tm_min: i32,
    tm_hour: i32,
    tm_mday: i32,
    tm_mon: i32,
    tm_year: i32,
    tm_wday: i32,
    tm_yday: i32,
    tm_isdst: i32,
    tm_gmtoff: i32,
    tm_zone: ~str,
    tm_nsec: i32,
}

Implementation of std::serialize::Encodable<__S> for Timespec

Method encode

fn encode(__s: &__S)

Implementation of std::serialize::Decodable<__D> for Timespec

Method decode

fn decode(__d: &__D) -> Timespec

Implementation for Timespec

Method new

fn new(sec: i64, nsec: i32) -> Timespec

Implementation of Eq for Timespec

Method eq

fn eq(other: &Timespec) -> bool

Method ne

fn ne(other: &Timespec) -> bool

Implementation of std::serialize::Encodable<__S> for Tm

Method encode

fn encode(__s: &__S)

Implementation of std::serialize::Decodable<__D> for Tm

Method decode

fn decode(__d: &__D) -> Tm

Implementation of Eq for Tm

Method eq

fn eq(other: &Tm) -> bool

Method ne

fn ne(other: &Tm) -> bool

Implementation for Tm

Method to_timespec

fn to_timespec() -> Timespec

Convert time to the seconds from January 1, 1970

Method to_local

fn to_local() -> Tm

Convert time to the local timezone

Method to_utc

fn to_utc() -> Tm

Convert time to the UTC

Method ctime

fn ctime() -> ~str

Return a string of the current time in the form "Thu Jan 1 00:00:00 1970".

Method strftime

fn strftime(format: &str) -> ~str

Formats the time according to the format string.

Method rfc822

fn rfc822() -> ~str

Returns a time string formatted according to RFC 822.

local: "Thu, 22 Mar 2012 07:53:18 PST" utc: "Thu, 22 Mar 2012 14:53:18 UTC"

Method rfc822z

fn rfc822z() -> ~str

Returns a time string formatted according to RFC 822 with Zulu time.

local: "Thu, 22 Mar 2012 07:53:18 -0700" utc: "Thu, 22 Mar 2012 14:53:18 -0000"

Method rfc3339

fn rfc3339() -> ~str

Returns a time string formatted according to ISO 8601.

local: "2012-02-22T07:53:18-07:00" utc: "2012-02-22T14:53:18Z"

Function at

fn at(clock: Timespec) -> Tm

Returns the specified time in the local timezone

Function at_utc

fn at_utc(clock: Timespec) -> Tm

Returns the specified time in UTC

Function do_strftime

fn do_strftime(format: &str, tm: &Tm) -> ~str

Function do_strptime

fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str>

Function empty_tm

fn empty_tm() -> Tm

Function get_time

fn get_time() -> Timespec

Returns the current time as a timespec containing the seconds and nanoseconds since 1970-01-01T00:00:00Z.

Function now

fn now() -> Tm

Returns the current time in the local timezone

Function now_utc

fn now_utc() -> Tm

Returns the current time in UTC

Function precise_time_ns

fn precise_time_ns() -> u64

Returns the current value of a high-resolution performance counter in nanoseconds since an unspecified epoch.

Function precise_time_s

fn precise_time_s() -> float

Returns the current value of a high-resolution performance counter in seconds since an unspecified epoch.

Function strftime

fn strftime(format: &str, tm: &Tm) -> ~str

Formats the time according to the format string.

Function strptime

fn strptime(s: &str, format: &str) -> Result<Tm, ~str>

Parses the time from the string according to the format string.

Function tzset

fn tzset()