How to convert std::chrono::time_point to std::tm without using time_t?
问题 I would like to print or extract year/month/day values. I don't want to use time_t because of the year 2038 problem, but all examples I found on the Internet use it to convert time_point to tm . Is there a simple way to convert from time_point to tm (preferably without boost )? An implementation like timesub from libc would be my last resort: http://www.opensource.apple.com/source/Libc/Libc-262/stdtime/localtime.c Edit: After reading the suggested links and doing some more research, I came to