你需要:
typedef long long time64_t; time64_t mktime64(struct tm *t); struct tm* localtime64_r(const time64_t* t, struct tm* p);
最初(2011年),此答案包含指向2038bug.com的链接,可以在其中下载
pivotal_gmtime_r包含上述功能的小型库。那时,该库已从2038bug.com中删除,链接断开并由主持人从答案中删除。
pivotal_gmtime_r现在可以在这里找到类似的代码:
https://github.com/franklin373/mortage/tree/master/time_pivotal
此外,我还找到了另一个较新的库
y2038,它也实现了
mktime64和
localtime64_r:
https://github.com/evalEmpire/y2038



