xtd 0.2.0
Loading...
Searching...
No Matches

◆ from_tm() [1/2]

static date_time xtd::date_time::from_tm ( const std::tm &  value)
static

Converts the specified std::tm to an equivalent unspecified time.

Parameters
valueA std::tm struct.
Returns
An object that represents the unspecified time equivalent of the date and time represented by the value parameter.
Exceptions
xtd::argument_out_of_range_exceptionvalue.ttm_year is less than 1 or greater than 9999.
-or-
tvalue.tm_mon is less than 1 or greater than 12.
-or-
value.tm_mday is less than 1 or greater than the number of days in month.
-or-
value.tm_hour is less than 0 or greater than 23.
-or-
value.tm_min is less than 0 or greater than 59
-or-
vale.tm_sec is less than 0 or greater than 59.
Remarks
std::tm is a structure holding a calendar date and time broken down into its components. is almost always an integral value holding the number of seconds (not counting leap seconds) since 00:00, Jan 1 1970 UTC, corresponding to POSIX time.
See <std::chrono for more information.