我想知道localtime()函数在Linux上是否有效?我想还有另一个命令,但我现在记不起来了。
显然,我的作业必须在linux上工作,否则它不会计分,而我的父母不知道如何使用它
发布于 2011-06-14 05:23:44
是的,localtime()
函数可以在Linux上运行。检查参考。
发布于 2011-06-14 05:24:59
根据this的说法,localtime()应该可以在Linux上很好地工作。
从链接的:
#include <time.h>
//...
struct tm *localtime(const time_t *timep);
struct tm *localtime_r(const time_t *timep, struct tm *result);
如果该声明与您所询问的localtime()相同(我假设是这样),那么在基于Linux的机器上使用它就可以了。
https://stackoverflow.com/questions/6339408
复制相似问题