我在 C++ http://aliarth.lt/date.cpp上创建了 date() 函数,但我遇到了一个localtome_to_time()
转换问题。有谁知道 local_time 变量如何:
int time_integer = 12345;
time_t time = (time_t)time_integer;
tm *local_time = localtime(&time);
local_time->tm_year = 100;
local_time->tm_mon = 10;
local_time->tm_mday = 1;
转换为time_t
?