Say I have a specific instant in time where I know the hour, minute, day, second, month, year, etc; how can I convert this epoch time (seconds since 1970)?
I can't use Boost, so please don't suggest a Boost solution.
c++time
Say I have a specific instant in time where I know the hour, minute, day, second, month, year, etc; how can I convert this epoch time (seconds since 1970)?
I can't use Boost, so please don't suggest a Boost solution.
Best Answer
Use the
mktime(3)
function. For example: