#[repr(C)]
pub struct Tm {
pub tm_sec: i32,
pub tm_min: i32,
pub tm_hour: i32,
pub tm_mday: i32,
pub tm_mon: i32,
pub tm_year: i32,
pub tm_wday: i32,
pub tm_yday: i32,
pub tm_isdst: i32,
pub tm_utcoff: i32,
pub tm_nsec: i32,
}
Holds a calendar date and time broken down into its components (year, month,
day, and so on), also called a broken-down time value.
Seconds after the minute - [0, 60]
Minutes after the hour - [0, 59]
Hours after midnight - [0, 23]
Day of the month - [1, 31]
Months since January - [0, 11]
Days since Sunday - [0, 6]. 0 = Sunday, 1 = Monday, ..., 6 = Saturday.
Days since January 1 - [0, 365]
Daylight Saving Time flag.
This value is positive if Daylight Saving Time is in effect, zero if
Daylight Saving Time is not in effect, and negative if this information
is not available.
Identifies the time zone that was used to compute this broken-down time
value, including any adjustment for Daylight Saving Time. This is the
number of seconds east of UTC. For example, for U.S. Pacific Daylight
Time, the value is -7*60*60 = -25200
.
Nanoseconds after the second - [0, 109 - 1]
Convert time to the seconds from January 1, 1970
Convert time to the local timezone
Returns a TmFmt that outputs according to the asctime
format in ISO
C, in the local timezone.
Example: "Thu Jan 1 00:00:00 1970"
Returns a TmFmt that outputs according to the asctime
format in ISO
C.
Example: "Thu Jan 1 00:00:00 1970"
Formats the time according to the format string.
Returns a TmFmt that outputs according to RFC 822.
local: "Thu, 22 Mar 2012 07:53:18 PST"
utc: "Thu, 22 Mar 2012 14:53:18 GMT"
Returns a TmFmt that outputs 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"
Returns a TmFmt that outputs according to RFC 3339. RFC 3339 is
compatible with ISO 8601.
local: "2012-02-22T07:53:18-07:00"
utc: "2012-02-22T14:53:18Z"
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the minimum of two values. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
Formats the value using the given formatter. Read more
The resulting type after applying the +
operator.
The resulting Tm is in UTC.
The resulting type after applying the -
operator.
The resulting Tm is in UTC.
The resulting type after applying the -
operator.
Performs the -
operation.
Feeds this value into the given [Hasher
]. Read more
Feeds a slice of this type into the given [Hasher
]. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static