std::chrono::system_clock::to_time_t - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::chrono::system_clock::to_time_t

From cppreference.com
< cpp‎ | chrono‎ | system clock

static std::time_t to_time_t( const time_point& t ); |  | (since C++11)

Converts `t` to a std::time_t type.

If std::time_t has lower precision, it is implementation-defined whether the value is rounded or truncated.

### [edit] Parameters

t | - | system clock time point to convert

### [edit] Return value

A std::time_t value representing `t`.

### [edit] Exceptions

`noexcept` specification:
noexcept

### [edit] See also

from_time_t [static] | converts std::time_t to a system clock time point (public static member function) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/chrono/system_clock/to_time_t&oldid=91352"
Category:

- unconditionally noexcept

Hidden categories:

- Pages with unreviewed unconditional noexcept template
- Pages with unreviewed noexcept template