HomeManualTopicsTypesSymbols

std::from_unix_time

constructs a date-and-time object from the number of seconds since the UNIX epoch

Parameter

seconds
the number of seconds since the UNIX epoch

Result

date_and_time
the date-and-time object

Description

The UNIX epoch is the moment of 1 January 1970, 00:00:00 UTC.

Example

$t from_unix_time(0) println! t

Output

1970-01-01 1:00:00.000 GMT+1

Topic

Date and Time

See also

std::current_time returns the current date and time