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

◆ from_time_t() [2/2]

static date_time xtd::date_time::from_time_t ( std::time_t  value,
date_time_kind  kind 
)
static

Converts the specified std::time_t to an equivalent to Coordinated Universal Time (UTC) or local time.

Parameters
valueA time interval from the start of the Clock's epoch.
kindOne of the enumeration values that indicates whether ticks specifies a local time, Coordinated Universal Time (UTC), or neither.
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 is less than xtd::date_time:min_value or represents a time greater than xtd::date_time:max_value.
Remarks
std::time_t 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.