Ockonal Ockonal - 7 months ago 42
C++ Question

How to get current time and date in C++?

Is there a cross-platform way to get the current date and time in C++?


std C libraries provide time(). This is seconds from the epoch and can be converted to date and H:M:S using standard C functions. Boost also has a time/date library that you can check.

time_t  timev;