Struct extra::time::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,
}

Methods

impl Tm

fn to_timespec(&self) -> Timespec

Convert time to the seconds from January 1, 1970

fn to_local(&self) -> Tm

Convert time to the local timezone

fn to_utc(&self) -> Tm

Convert time to the UTC

fn ctime(&self) -> ~str

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

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

Formats the time according to the format string.

fn rfc822(&self) -> ~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"

fn rfc822z(&self) -> ~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"

fn rfc3339(&self) -> ~str

Returns a time string formatted according to ISO 8601.

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

Trait Implementations

impl std::clone::Clone for Tm

fn clone(&self) -> Tm

impl std::clone::DeepClone for Tm

fn deep_clone(&self) -> Tm

impl std::cmp::Eq for Tm

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

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

impl<__E: Encoder> Encodable<__E> for Tm

fn encode(&self, __arg_0: &mut __E)

impl<__D: Decoder> Decodable<__D> for Tm

fn decode(__arg_0: &mut __D) -> Tm