This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] Compiler/msp430f5418a:从 Unix 时间转换时,gmtime 关闭29天。

Guru**** 2538950 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/610809/compiler-msp430f5418a-gmtime-is-off-29-days-when-converting-from-a-unix-time

器件型号:MSP430F5418A

工具/软件:TI C/C++编译器

我有一个函数正在根据1970年的 UNIX 时代传递一个 TM。 我要添加所需的2208988800秒、但 gmtime 会在"29天、19:59:51"之前关闭。  gmtime (2208988800)确实返回1/1970 04:00:00、考虑到时区、这是正确的。  有人有什么建议吗?

谢谢,

Paul